Advertisement
DerMarten

Button Grundgerüst

Jul 26th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("back")
  3. m.clear()
  4. --------------------------------
  5. function fillTable()
  6.   button.setTable("Button1", button1, 3, 11, 3, 5)
  7.   button.screen()
  8. end
  9.  
  10. function getClickt()
  11.   event, side,x,y = os.pullEvent("monitor_touch")
  12.   button.checkxy(x,y)
  13. end
  14. function button1()
  15.   button.toggleButton("Button1")
  16. end
  17. ----------------------------------
  18. fillTable()
  19. button.heading("Button Test")
  20. while true do
  21.   getClickt()
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement