Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("left")
- if not monitor then
- printError("No monitor found. Please connect a monitor.")
- end
- function monitorTouchDraw(xPos, yPos, xPos2, yPos2)
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- event, side, xPos2, yPos2 = os.pullEvent("monitor_touch")
- break
- end
- term.redirect(monitor)
- paintutils.drawLine(xPos, yPos, xPos2, yPos2, 0x1)
- end
- while true do
- monitorTouchDraw()
- term.native()
- end
Advertisement
Add Comment
Please, Sign In to add comment