Guest User

Untitled

a guest
Jan 21st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. declare('helloworld', {})
  2. helloworld.ui = {}
  3.  
  4.  
  5. helloworld.ui.dlg = hwdlg
  6.  
  7.  
  8.  
  9. mainbox = iup.vbox{
  10. iup.hbox{iup.fill{},iup.label{title="\127ff6600Hello World"}, size="450x450",iup.fill{}}
  11. }
  12.  
  13. button = iup.vbox{
  14. iup.hbox{iup.fill{},
  15. iup.stationbutton{title="Close", action=function()
  16. HideDialog(helloworld.ui.dlg)
  17.  
  18.  
  19. end},
  20. iup.fill{}
  21. },
  22.  
  23. }
  24.  
  25.  
  26. function OpenHelloworldDlg()
  27. ShowDialog(helloworld.ui.dlg, iup.CENTER, iup.CENTER)
  28. end
  29.  
  30.  
  31.  
  32. function CreateHelloworldDlg()
  33.  
  34. iup.Append(mainbox, button)
  35.  
  36. hwdlg = iup.dialog{ --everytime I see dialog I think of two people talking....now Im just rambling..
  37. iup.stationhighopacityframe{ --better than clear or else it gets kinda weird...now, where is my drink..ah, there it is....
  38. iup.stationhighopacityframebg{
  39. mainbox,
  40. button
  41.  
  42. }
  43. },
  44.  
  45. active = "YES",
  46. topmost = "YES",
  47. resize = "NO",
  48. title = "Hello World"
  49.  
  50.  
  51. }
  52.  
  53. return hwdlg
  54.  
  55. end
  56.  
  57. helloworld.ui.dlg = CreateHelloworldDlg()
  58.  
  59.  
  60.  
  61.  
  62. RegisterUserCommand('hello', OpenHelloworldDlg)
Add Comment
Please, Sign In to add comment