Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m=peripheral.find("monitor")
- if m == nil then
- m = term
- end
- function set()
- m.clear()
- button.clearTable()
- button.screen()
- end
- function display()
- set()
- event,side,x,y=os.pullEvent()
- if m == term then
- while event ~= "mouse_click" do
- event,side,x,y=os.pullEvent()
- end
- else
- while event ~= "monitor_touch" do
- event,side,x,y=os.pullEvent()
- end
- end
- button.checkxy(x,y)
- end
- while true do
- display()
- sleep(.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement