Well, I got a bit further - I consulted again openFrameworks/examples/gui/guiExample
, and it turns out you have to use void arguments in the function that is going to be a listener for ofxButton
, you cannot use a bool like for ofxToggle
. So with these changes:
in ofApp.h
:
void testButtonChange(); //(bool & inval);
in ofApp.cpp
:
testButton.addListener(this, &ofApp::testButtonChange); //****
...
void ofApp::testButtonChange(){
ofLogNotice() << "testButtonChange: release" << endl;
}
... finally I managed to get a response from click of ofxButton
.
Unfortunately, it only reacts on button release, and not on button press.
So, my question is now - can I get ofxButton
to react somehow on mouse press? (And also, still would like to know on the status of utf-8 display here with ofxGui
)