Skip to content

Commit

Permalink
Merge pull request #25 from artificiel/boolfix
Browse files Browse the repository at this point in the history
fix for ofParameter<bool> single item constructor
  • Loading branch information
moebiussurfing authored Dec 18, 2024
2 parents 8e5ee76 + 48e9a59 commit 91643f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/SurfingImGui/SurfingGuiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4624,28 +4624,28 @@ void SurfingGuiManager::keyPressed(ofKeyEventArgs & eventArgs) {
switch (key) {
case OF_KEY_F1:
bLayoutPresets[0] = !bLayoutPresets[0];
logKeyParamToggle(bLayoutPresets[0], "F1");
logKeyParamToggle(bLayoutPresets[0], {"F1", true});
doFlagBuildHelpInternalInfo();
return;
break;

case OF_KEY_F2:
bLayoutPresets[1] = !bLayoutPresets[1];
logKeyParamToggle(bLayoutPresets[1], "F2");
logKeyParamToggle(bLayoutPresets[1], {"F2", true});
doFlagBuildHelpInternalInfo();
return;
break;

case OF_KEY_F3:
bLayoutPresets[2] = !bLayoutPresets[2];
logKeyParamToggle(bLayoutPresets[2], "F3");
logKeyParamToggle(bLayoutPresets[2], {"F3", true});
doFlagBuildHelpInternalInfo();
return;
break;

case OF_KEY_F4:
bLayoutPresets[3] = !bLayoutPresets[3];
logKeyParamToggle(bLayoutPresets[3], "F4");
logKeyParamToggle(bLayoutPresets[3], {"F4", true});
doFlagBuildHelpInternalInfo();
return;
break;
Expand All @@ -4657,23 +4657,23 @@ void SurfingGuiManager::keyPressed(ofKeyEventArgs & eventArgs) {
if (key == OF_KEY_F5) // Presets
{
bGui_LayoutsPresetsSelector = !bGui_LayoutsPresetsSelector;
logKeyParamToggle(bGui_LayoutsPresetsSelector, "F5");
logKeyParamToggle(bGui_LayoutsPresetsSelector, {"F5", true});
doFlagBuildHelpInternalInfo();
return;
}

else if (key == OF_KEY_F6) // Panels
{
bGui_LayoutsPanels = !bGui_LayoutsPanels;
logKeyParamToggle(bGui_LayoutsPanels, "F6");
logKeyParamToggle(bGui_LayoutsPanels, {"F6", true});
doFlagBuildHelpInternalInfo();
return;
}

else if (key == OF_KEY_F7) // Manager
{
bGui_LayoutsManager = !bGui_LayoutsManager;
logKeyParamToggle(bGui_LayoutsManager, "F7");
logKeyParamToggle(bGui_LayoutsManager, {"F7", true});
doFlagBuildHelpInternalInfo();
return;
}
Expand Down Expand Up @@ -4825,7 +4825,7 @@ void SurfingGuiManager::keyPressed(ofKeyEventArgs & eventArgs) {
// Solo
if ((key == 's' && bMod_CONTROL) || key == 19) {
bSolo = !bSolo;
logKeyParamToggle(bSolo, "Ctrl + s");
logKeyParamToggle(bSolo, {"Ctrl + s", true});
doFlagBuildHelpInternalInfo();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/SurfingImGui/SurfingGuiManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -4505,7 +4505,7 @@ class SurfingGuiManager {

//-

vector<ofParameter<bool>> bLayoutPresets { "bLayoutPresets" }; // each window show toggles
vector<ofParameter<bool>> bLayoutPresets { }; // each window show toggles
void Changed_Params(ofAbstractParameter & e);
ofParameterGroup params_LayoutsPanel { "Layouts Panel" };

Expand Down

0 comments on commit 91643f4

Please sign in to comment.