Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

OfxGui: utf-8 and reacting on ofxButton press?

$
0
0

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)


Viewing all articles
Browse latest Browse all 40524

Trending Articles



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