xavierlebel

MENU3

Mar 4th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("button")
  2. m = peripheral.wrap("top")
  3. m.clear()
  4.  
  5. function fillTable()
  6.    button.setTable("Thaumium", test1, 2,16,4,4)
  7.    button.setTable("Nitor", test2, 2,16,6,6)
  8.    button.setTable("Alumentum", test3, 2,16,8,8)
  9.    button.setTable("Tallow", test4, 2,16,10,10)
  10.    button.screen()
  11. end
  12.  
  13. function getClick()
  14.    event,side,x,y = os.pullEvent("monitor_touch")
  15.    button.checkxy(x,y)
  16. end
  17.  
  18. function test1()
  19.    button.toggleButton("Thaumium")
  20.    print("1")
  21. end
  22.  
  23. function test2()
  24.    button.toggleButton("Nitor")
  25.    print("2")
  26. end
  27.  
  28. function test3()
  29.    button.toggleButton("Alumentum")
  30.    print("3")
  31. end
  32.  
  33. function test4()
  34.    button.toggleButton("Tallow")
  35.    print("4")
  36. end
  37.  
  38. fillTable()
  39. --button.heading("Demo Button Prog")
  40. button.label(2,2,"Materials")
  41.  
  42. while true do
  43.    getClick()
  44. end
Advertisement
Add Comment
Please, Sign In to add comment