Advertisement
PaChICk

Paint on monitor

Feb 12th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. local monitor = peripheral.wrap("right")
  2. local width, height = monitor.getSize()
  3. print(width, " ", height)
  4.  
  5. function draw(x, y)
  6.     monitor.setCursorPos(x, y)
  7.     monitor.write("#")
  8. end
  9.  
  10. while redstone.getInput("left")
  11.     local event, side, y = os.pullEvent("monitor_touch")
  12.     draw(x, y)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement