Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("monitor_0")
- m.clear()
- --------------------------------
- function fillTable()
- button.setTable("Licht oben", button1, 2, 12, 2, 4)
- button.setTable("Licht unten", button2, 16, 26, 2, 4)
- button.setTable("Tor", button3, 2, 12, 6, 8)
- button.setTable("Tur", button4, 16, 26, 6, 8)
- button.setTable("Strom", button5, 2, 12, 10, 12)
- button.setTable("ME", button6, 16, 26, 10, 12)
- button.setTable("Button7", button7, 2, 12, 14, 16)
- button.setTable("Button8", button8, 16, 26, 14, 16)
- button.setTable("ALARM", button9, 2, 26, 18, 19)
- --------------------------------xmin-xmax-ymin-ymax
- button.screen()
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button1()
- button.toggleButton("Licht oben")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button2()
- button.toggleButton("Licht unten")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button3()
- button.toggleButton("Tor")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button4()
- button.toggleButton("Tur")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button5()
- button.toggleButton("Strom")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button6()
- button.toggleButton("ME")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button7()
- button.toggleButton("Button7")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button8()
- button.toggleButton("Button8")
- end
- function getClickt()
- event, side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function button9()
- button.toggleButton("ALARM")
- end
- -------------------------------------
- fillTable()
- while true do
- getClickt()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement