mouse_drag event
Occurs every time the mouse moves to a different position while a mouse button is held down (e.g. left click dragging). It will always be called after a mouse_click event.
| mouse_drag Event  | |
|---|---|
Returns
  | |
| Source | CC:Tweaked | 
![]()
  | 
  |||
| Prints the mouse coordinates every time the mouse is dragged on the screen. | |||
| Code | <nowiki>
while true do
  local event, button, x, y = os.pullEvent("mouse_drag")
  print("Dragged to:", x, y)
end
    </nowiki>
 | 
    ||
    This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.