Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = peripheral.wrap("top")
- s.clear()
- s.setCursorPos(1,1)
- s.setBackgroundColor(colors.blue)
- s.write("Odchod")
- function odchod(ox,oy)
- if oy==10 and ( ox > 9 and ox < 18) then
- print("klik na odchod")
- s.setCursorPos(1,1)
- s.setBackgroundColor(colors.green)
- s.write("Odchod")
- rs.setOutput("bottom", true)
- sleep(13)
- rs.setOutput("bottom", false)
- s.setCursorPos(1,1)
- s.setBackgroundColor(colors.blue)
- s.write("Odchod")
- end
- end
- while true do
- local e,s,x,y = os.pullEvent("monitor_touch")
- odchod(x,y)
- print(x..":"..y)
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement