Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin get YyyiwY1C b
- monitor = peripheral.wrap("top")
- monitor.setTextScale(0.5)
- function clear()
- monitor.clear()
- monitor.setCursorPos(1,1)
- end
- function printMenu()
- clear()
- for i=1,16 do
- monitor.setCursorPos(1,i)
- monitor.write(i)
- end
- end
- while true do
- printMenu()
- event, side, x, y = os.pullEvent("monitor_touch")
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- print(event .. " => Side: " .. tostring(side) .. ", " ..
- "X: " .. tostring(xPos) .. ", " ..
- "Y: " .. tostring(yPos))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement