frauzufall / ofxGuiExtended

ofParameter based GUI addon for openFrameworks; derived from the core OF ofxGui addon and ofxDOM.
MIT License
113 stars 30 forks source link

Disabling controls #20

Open thomasgeissl opened 9 years ago

thomasgeissl commented 9 years ago

Is it posible to disable controls? I would like to make sliders and buttons/toggles just show values, but disable editing.

thomasgeissl commented 9 years ago

I just saw ofxBaseGui::registerMouseEvents() and ofxBaseGui::unregisterMouseEvents(). And I tried rotary.unregisterMouseEvents() in exampleControls, but it did not work. I will have a closer look tomorrow.

thomasgeissl commented 9 years ago

This is an ofxGui issue: http://forum.openframeworks.cc/t/ofxgui-disable-widgets/20304

I do not know what is the easiest way to implement this, without having to modify all classes. I would add a member bool enabled, getter and setter to ofxBaseGui. In ofxBaseGui::mouseReleased and ofxBaseGui::mousePressed check if it is enabled and then call the actual handler.

frauzufall commented 9 years ago

We are working on some fundamental changes - see this PR https://github.com/openframeworks/openFrameworks/pull/4150 I am trying to adapt this addon to the new strategy and there are some things we still need to figure out, this may take some time. I will keep this request in mind, it should not be too hard, as you said.

thomasgeissl commented 9 years ago

Nice, it looks promising. Let me know if I can do some testing or help somehow.

frauzufall commented 9 years ago

I will, thanks!