We are about to switch to a new forum software. Until then we have removed the registration on this forum.
In P2D this prints out 37 for the left mouse and 39 for the right mouse, but in FX2D it returns 0 for both (unless you release while holding the other mouse button down, then it outputs the number for the one still held down).
Mouse presses work fine, but is there a different way to get the released mouse button in FX2D?
Answers
There's no need for MouseEvent nor its getButton() method. ;;)
Just use mouseButton variable: https://Processing.org/reference/mouseButton.html
But it seems like mouseReleased() isn't working correctly for renderer FX2D: :-SS
https://Processing.org/reference/mouseReleased_.html
So you should warn the devs about it: #:-S
https://GitHub.com/processing/processing/issues
The mouseButton global variable also just returns 0 for left and right in FX2D.