Advertisement
Mr_redstone5230

Test de drag

Oct 21st, 2019
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1.    
  2. x = 5
  3. y = 5
  4. while true do
  5.   term.setBackgroundColor( colors.black )
  6.   term.clear()
  7.   paintutils.drawPixel( x, y, colors.red )
  8.  
  9.   event, button, xPos, yPos = os.pullEvent("mouse_drag")
  10.  
  11.   if button == 1 then -- left button was clicked
  12.     x = xPos
  13.     y = yPos
  14.   end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement