Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("top")
- m.clear()
- function fillTable()
- button.setTable("Thaumium", test1, 2,16,4,4)
- button.setTable("Nitor", test2, 2,16,6,6)
- button.setTable("Alumentum", test3, 2,16,8,8)
- button.setTable("Tallow", test4, 2,16,10,10)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function test1()
- button.toggleButton("Thaumium")
- print("1")
- end
- function test2()
- button.toggleButton("Nitor")
- print("2")
- end
- function test3()
- button.toggleButton("Alumentum")
- print("3")
- end
- function test4()
- button.toggleButton("Tallow")
- print("4")
- end
- fillTable()
- --button.heading("Demo Button Prog")
- button.label(2,2,"Materials")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment