Vodka51200

MonitorTouch pour paintutils

Apr 14th, 2021 (edited)
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. mon = peripheral.find("monitor")
  2. mon.setBackgroundColor(colors.black)
  3. mon.clear()
  4. while true do
  5.     event,side,xPos,yPos = os.pullEvent("monitor_touch")
  6.     print("X: "..xPos.."| Y: "..yPos)
  7.     mon.setCursorPos(xPos,yPos)
  8.     mon.setBackgroundColor(colors.green)
  9.     mon.write(" ")
  10. end
Add Comment
Please, Sign In to add comment