Display notifications (noty)

Created a nice software using SpiderBasic ? Post you link here !
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Display notifications (noty)

Post by Peter »

Hello,

this snippet shows how to display notifications using noty (http://ned.im/noty/):

Code: Select all

#Window = 0
#Button = 0

Procedure OpenNoty()
  
  ! noty({ text: 'noty - a jquery notification library!', layout: 'center' });
  
EndProcedure

Procedure ScriptLoaded()
  
  DisableGadget(#Button, #False)
  
EndProcedure

Procedure LoadScript(Script.s, *OnLoadFunction)
  
  ! $.getScript(v_Script, p_OnLoadFunction);
  
EndProcedure 

OpenWindow(#Window, 0, 0, 0, 0, "noty", #PB_Window_Background)

ButtonGadget(#Button, 10, 10, 100, 30, "Open noty")
BindGadgetEvent(#Button, @OpenNoty())
DisableGadget(#Button, #True)

LoadScript("https://raw.githubusercontent.com/needim/noty/master/js/noty/packaged/jquery.noty.packaged.min.js", @ScriptLoaded())
Greetings ... Peter