Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("right")
- o = "back"
- rec = false
- m.clear()
- function fillTable()
- button.setTable("Red", red, 10,20,3,5)
- button.setTable("Green", green, 10,20,7,9)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function red()
- if rec then
- print("red is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.red))
- else
- print("red is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.red))
- end
- button.toggleButton("Red")
- rec = not rec
- end
- function green()
- print("green")
- end
- fillTable()
- button.heading("Test Programm")
- button.label(1,4,"Skeleton")
- rs.setBundledOutput(o,0)
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement