Last active
May 18, 2020 05:34
-
-
Save moebiussurfing/f5e6d2b978ed9bb68f6cd8fd1f895320 to your computer and use it in GitHub Desktop.
openFrameworks - bool parameter lambda callback listener: button and toggle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//group | |
ofAddListener(params.parameterChangedE(), this, &ofxGpuLutCube::Changed_params); | |
//toggle | |
ofEventListener listener; | |
listener = SHOW_CONTROL.newListener([this](bool b) { | |
OSC_Helper.setVisiblePlots(b); | |
//std::cout << b << std::endl; | |
}); | |
//buttons | |
listener_bPrev = bPrevious.newListener([this](const void * sender) { | |
ofParameter<void> * p = (ofParameter<void> *)sender; | |
string name = p->getName(); | |
ofLogNotice("ofxGpuLutCube") << "Changed_button_param: 'PREVIOUS'"; | |
if (name == "PREVIOUS") | |
{ | |
previous(); | |
} | |
}); | |
listener_bNext = bNext.newListener([this](const void * sender) { | |
ofParameter<void> * p = (ofParameter<void> *)sender; | |
string name = p->getName(); | |
ofLogNotice("ofxGpuLutCube") << "Changed_button_param: 'NEXT'"; | |
if (name == "NEXT") | |
{ | |
next(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment