Advertisement
Guest User

sgc.lua

a guest
Jul 19th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. local GUI = require("GUI")
  2.  
  3.  
  4. --------------------------------------------------------------------------------
  5.  
  6. local application = GUI.application()
  7. application:addChild(GUI.panel(1, 1, application.width, application.height, 0x2D2D2D))
  8.  
  9. local switch1 = application:addChild(GUI.switchAndLabel(2, 2, 25, 8, 0x66DB80, 0x1D1D1D, 0xEEEEEE, 0x999999, "Kyle On/Off:", false))
  10. local switch2 = application:addChild(GUI.switchAndLabel(2, 4, 25, 8, 0x66DB80, 0x1D1D1D, 0xEEEEEE, 0x999999, "Sample text 2:", false))
  11.  
  12. switch2.switch.onStateChanged = function(state)
  13.   GUI.alert("Switch state changed!")
  14. end
  15.  
  16.  
  17.  
  18. --------------------------------------------------------------------------------
  19.  
  20. application:draw(true)
  21. application:start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement