Clicks on ofxGui Panel params pass through to main window


#1

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?


#2

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.


#3

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 http://openframeworks.cc/download/ towards the end of the page.


#4

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