Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("right")
  3. p = peripheral.wrap("back")
  4. m.clear()
  5.  
  6. function fillTable()
  7. button.setTable("white",white,3,17,1,3)
  8. button.setTable("orange",orange,3,17,5,7)
  9. button.setTable("magenta",magenta,3,17,9,11)
  10. button.setTable("light blue",light_blue,3,17,13,15)
  11. button.setTable("yellow",yellow,3,17,17,19)
  12. button.setTable("lime",lime,3,17,1,3)
  13. button.setTable("pink",pink,3,17,5,7)
  14. button.setTable("grey",grey,3,17,9,11)
  15. ----------------------------------------------------
  16. button.setTable("light grey",light_grey,23,37,13,15)
  17. button.setTable("cyan",cyan,23,37,17,19)
  18. button.setTable("purple",purple,23,37,9,11)
  19. button.setTable("blue",blue,23,37,13,15)
  20. button.setTable("brown",brown,23,37,17,19)
  21. button.setTable("green",green,23,37,17,19)
  22. button.setTable("red",red,23,37,17,19)
  23. button.setTable("black",black,23,37,17,19)
  24. button.screen()
  25. end
  26.  
  27. function getClick()
  28. event,side,x,y = os.pullEvent("monitor_touch")
  29. button.checkxy(x, y)
  30. end
  31.  
  32.  
  33. fillTable()
  34. while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement