Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. slider_int = ""
  2. edit_text = ""
  3. msg_text = "Example Text"
  4. itembox_index = 0
  5.  
  6.  
  7. function example()
  8. --NECESSARILY
  9. mgui.max_component(10,100) -- The number of menus, Number of components
  10.  
  11. mgui.menu(300,340,490,250,"Example Menu",1)
  12.  
  13. mgui.panel(10,15,55,230,"Example Panel 1",2,1)
  14. mgui.panel(10,90,50,230,"Example Panel 2",5,1)
  15. mgui.panel(10,160,70,230,edit_text,7,1)
  16. mgui.panel(10,250,70,230,"Example Panel "..slider_int,9,1)
  17. mgui.panel(10,340,70,230,"Example Panel "..itembox_index,12,1)
  18. mgui.panel(10,425,50,230,"Example Panel 6",13,1)
  19.  
  20. if mgui.button(25,30,28,200,"Example Button",4,1) then
  21. print("Button Click")
  22. end
  23.  
  24. checkbox_bool = mgui.checkbox(25,105,200,"Example Checkbox",false,6,1)
  25. if checkbox_bool == true then
  26. print("CheckBox On")
  27. end
  28. if checkbox_bool == false then
  29. print("CheckBox Off")
  30. end
  31.  
  32. edit_text = mgui.edit(25,175,200,"Example Edit","Example Text",8,1)
  33.  
  34.  
  35. slider_int = mgui.slider(25,265,200,10,"Example Slider","$",1,10,1)
  36.  
  37. if mgui.bind_field(25,440,200,"Example Bind",15,1) then
  38. print("Key Pressed")
  39. end
  40.  
  41. itembox_index,itembox_text = mgui.itembox(25,355,200,"Example ItemBox",{"item 1","item 2","item 3","item 4","item 5","item 6"},5,14,1)
  42.  
  43. mgui.menu_mouse(1) -- If you need to move the menu with the mouse
  44. mgui.msg_show() -- If you want to open dialog boxes
  45. mgui.item_show() -- If there is an itembox component on the form, add this line
  46. end
  47.  
  48. RunScript( "mgui.lua" ) -- Library connections
  49.  
  50. callbacks.Register( "Draw", "example", example );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement