Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("Button")
- m = peripheral.wrap("right")
- m.clear()
- function fillTable()
- button.setTable("LightsOn", LightsOn, 20,40,3,10)
- button.setTable("LightsOff", LightsOff, 60,80,3,10)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function test1()
- button.toggleButton("LightsOn")
- print("LightsOn")
- end
- function test2()
- button.toggleButton("LightsOn")
- print("LightsOn")
- end
- fillTable()
- button.heading("SpaceShipControl")
- button.label(30,10,"Lights")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment