Quantcast
Viewing all articles
Browse latest Browse all 40524

Dynamic buttons

Hi,
For ofxButton I don't know, but for ofxToggle I just found this:

void ofApp::togglePressed( const void * sender, bool & pressed )
{
    ofParameter<bool> * v = (ofParameter<bool> *)sender;
    const string & name = v->getName();
    ...
}

Because the sender is not the ofxToggle, but the ofParameter which carry the toggle value. Luckily the ofParameter has the same name as the toggle.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>