Skip to content

Instantly share code, notes, and snippets.

@moebiussurfing
Last active January 21, 2023 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moebiussurfing/d2726674a408b6899abff668ec4312e0 to your computer and use it in GitHub Desktop.
Save moebiussurfing/d2726674a408b6899abff668ec4312e0 to your computer and use it in GitHub Desktop.
openFrameworks | Int / Lambda callbacks : ofParameters
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