We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How can wheel button events be recognized in a library? The mouseEvent(MouseEvent e) method does not trigger when the wheel button is pressed! Any workarounds for this?
Thanks in advance, Alex
Answers
Did you try this example?
https://processing.org/reference/mouseWheel_.html
@jeremydouglass thanks for the reply! I did not try that since it cannot be written within the library. I did solve my problem however. The mouse wheel button can be recognized through the expression
e.getButton() == 3
ore.getButton() == CENTER
.Also, for future uses, note that when the mouse wheel button is pressed, the method e.isAltPressed() returns true (for some unknown reason), so be careful how you combine those expressions... (may cause a lot of frustration!!!)