Advertisement
Hiranus

button sample 2

Sep 30th, 2014
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. os.loadAPI("button")
  2. button.prepareMonitor()
  3. button.setGlobalButtonVar(11,3,2)
  4. function test1()
  5.   print ("test1")
  6. end
  7. function test2()
  8.   print ("test2")
  9. end
  10. function test3()
  11.   print ("test3")
  12. end
  13. function test4()
  14.   print ("test4")
  15. end
  16. button.addBasicButton("This",test1,button.toggle)
  17. button.addBasicButton("API",test2,button.toggle)
  18. button.addBasicButton("Is",test3,button.flash)
  19. button.addBasicButton("Cool",test4,button.toggle)
  20. button.calculateButtons()
  21. button.redrawScreen()
  22. while true do
  23.   button.getClick()
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement