Last active
January 21, 2023 10:14
-
-
Save moebiussurfing/d2726674a408b6899abff668ec4312e0 to your computer and use it in GitHub Desktop.
openFrameworks | Int / Lambda callbacks : ofParameters
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
ofParameter<int> MODE_COLOR{ "Palette Type", 1, 1, 3 }; | |
ofParameter<int> MODE_SORTING{ "Sorting Mode", 0, 1, 5 }; | |
ofParameter<bool> bPlayerBeat{"Next", false}; | |
ofEventListener listener_ModeColor; | |
ofEventListener listener_ModeSorting; | |
ofEventListener listener_Beat; | |
//-------------------------------------------------------------- | |
listener_ModeSorting = MODE_SORTING.newListener([this](int &i) { | |
//ofLogNotice(__FUNCTION__) << i; | |
ofLogNotice("MODE_SORTING: ") << i; | |
}); | |
//-------------------------------------------------------------- | |
listener_ModeColor = MODE_COLOR.newListener([this](int &i) { | |
ofLogNotice("MODE_COLOR: ") << i; | |
}); | |
//-------------------------------------------------------------- | |
listener_Beat = surfingPlayer.bPlayerBeat.newListener([this](bool &b) { | |
ofLogNotice("BEAT: ") << (b ? "TRUE" : "FALSE"); | |
//colorClient.nextPreset(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment