problems with ofxSimpleGuiToo

I’m using the ofxSimpleGuiToo addon.
At the end of my draw() function I check whether to draw the gui or not.


A keypress on ‘g’ toggles the SHOWGUI value. Works fine.

Anyway, it seems the gui reacts to mouse clicks regardless of whether or not it’s displayed. So I click around in my window to draw stuff but sometimes I hit a button on the (hidden) menu and change some settings.
Do I miss something, or is this a bug in the menu addon?

Hi, this may be a bit confusing, but gui.draw() keeps track of whether to draw itself or not. So you should ALWAYS call gui.draw(). but set its visibility with gui.setDraw(false/true) or or gui.hide() or gui.toggleDraw(). when it’s not visible, then it wont capture events. If you manually handle it’s visibility with your own variable, then the gui wont’ know whether its visible or not, and won’t know whether to capture the events.