Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local eh = events.createHandler()
- local running = true
- local test = {0,0}
- eh:connect("mouse_up", function(btn, x, y)
- test = {x, y}
- end)
- function draw()
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- paintutils.drawFilledBox(test[1],test[2],1,1,colors.white)
- sleep(1/30)
- end
- while running do
- parallel.waitForAny(eh.update, draw)
- end
Add Comment
Please, Sign In to add comment