mouse_scroll event
![]()
|
|||
| Prints the scroll direction and mouse coordinates every time the user scrolled. | |||
| Code | <nowiki>
local scroll_directions = { [-1] = "up", [1] = "down" }
while true do
local event, direction, x, y = os.pullEvent("mouse_scroll")
print("The mousewheel scrolled", scroll_directions[direction], "at", x, ",", y)
end
</nowiki>
|
||
| mouse_scroll Event | |
|---|---|
Returns
| |
| Source | CC:Tweaked |
Occurs every time a mousewheel scrolls.
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.