mouse_up event
Occurs every time a mouse button is released after it was pressed down.
mouse_up Event | |
---|---|
Returns
| |
Source | CC:Tweaked |
|
|||
Prints the mouse coordinates and button name every time a mouse button is released. | |||
Code | <nowiki>
local button_names = { [1] = "left", [2] = "right", [3] = "middle" }
while true do
local event, button, x, y = os.pullEvent("mouse_up")
print("The", button_names[button], "mouse button has been released at", 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.