Clicks on ofxGui Panel params pass through to main window

Not sure if this is a bug, but clicking and dragging on ofxGui Panel parameters (or the titlebar of an ofxPanel) causes those mouse clicks to pass through to the main window (and thus manipulate the camera, for example).

How do I stop this from happening?

There are a few options
You can use setControlArea in of 0.1.0 or higher and exclude the area you have your Gui in.

You can have a shortkey to show the gui and when the GUI is shown you can disable mouse interaction for the camera and vice versa.

You can check if the mouse is inside any of the GUI rectangles and disable mouse interaction for the camera when you click down if the mouse is inside those rectangles and re-enable it when you release the mouse.

This is a bug actually.
it should not happen.
I made a fix recently that should have fixed it but I am seeing that it has an edge case that needs to be addressed (when moving the ofEasyCam and releasing the mouse button over the gui). Can you test with the latest nightly build please? Nightly builds are available in towards the end of the page.

1 Like

FYI, I made this Pull Request that fixes this issue.