Skip to content

Commit

Permalink
fix status message error example for select event
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHardeman committed Oct 2, 2020
1 parent 24cb7c1 commit 04724ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions example/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void ofApp::setup(){

ofAddListener(gui.guiLoadEvent, this, &ofApp::onGuiLoad );
ofAddListener(gui.guiSaveEvent, this, &ofApp::onGuiSave );
ofAddListener(gui.guiElementSelectedEvent, this, &ofApp::onGuiSelectElement );

//load from xml!
gui.loadSettings("controlPanelSettings.xml");
Expand Down Expand Up @@ -109,6 +110,14 @@ void ofApp::onGuiSave( bool& ab ) {
cout << "onGuiSave : " << ab << " | " << ofGetFrameNum() << endl;
}

//--------------------------------------------------------------
void ofApp::onGuiSelectElement( shared_ptr<guiBaseObject>& aobj ) {
// aobj->value.paramGroup.get(0);
cout << "onGuiSelectElement :: " << aobj->name << " num params: " << aobj->value.paramGroup.size() << " | " << ofGetFrameNum() << endl;
ofAbstractParameter& tparam = gui.getParam( aobj );
cout << "onGuiSelectElement :: abstract param: " << tparam.getName() << " value: " << tparam << endl;
}

//--------------------------------------------------------------
void ofApp::onFilePathChange( string& astr ) {
cout << "onFilePathChange: " << astr << " | " << ofGetFrameNum() << endl;
Expand Down
1 change: 1 addition & 0 deletions example/src/ofApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ofApp: public ofBaseApp{

void onGuiLoad( bool& ab );
void onGuiSave( bool& ab );
void onGuiSelectElement( shared_ptr<guiBaseObject>& aobj );
void onFilePathChange( string& astr );
void onToggleChange( int& aint );

Expand Down

0 comments on commit 04724ad

Please sign in to comment.