Skip to content

Instantly share code, notes, and snippets.

@moebiussurfing
Last active February 24, 2020 04:38
Show Gist options
  • Save moebiussurfing/e7e24d801ed47cd65c60db95862aae72 to your computer and use it in GitHub Desktop.
Save moebiussurfing/e7e24d801ed47cd65c60db95862aae72 to your computer and use it in GitHub Desktop.
openFrameworks - ofxGuiExtended customize widgets
//ofxGuiExtended
gui_VideoFx = gui.addGroup(params_GuiPanel);
//group folding with group names bc by default name is not showed
gFrag1 = gui_VideoFx->addGroup("FRAG1");
gFrag2 = gui_VideoFx->addGroup("FRAG2");
gFrag3 = gui_VideoFx->addGroup("FRAG3");
gFrag1->add(frag1.parameters);
gFrag2->add(frag2.parameters);
gFrag3->add(frag3.parameters);
(gui_VideoFx->getIntSlider("FX"))->setConfig({
//{"padding", 10},
{"margin", "10 20 30 40"},
{"text-align", "right"},
//{"text-padding", 20},
{"height", 100}
});
//---
(group_USER->getToggle("PLAY"))->setConfig(j_itemFat);
(group_USER->getIntSlider("COUNTER"))->unregisterMouseEvents();//disable user mouse
//(group_USER->getIntSlider("RANGE"))->setConfig(j_itemMini);
(group_USER->getToggle("RANGE MOOD"))->setConfig({
{"type", "fullsize"},
{"text-align", "center"},
{"text-color", "rgba(0,0,0,1.0)"},
{"border-radius", 5.0f},
{"height", gui_slider_big_h},
});
//---
//big buttons
ofJson j_itemFat =
{
{"type", "fullsize"},
{"height", 100},
{"text-align", "center"},
};
//---
//disable mouse interaction
(group_USER->getToggle("RANGE MOOD"))->unregisterMouseEvents();
//---
//slider on release
(gui_VideoFx->getIntSlider("FX"))->setConfig({
//{"padding", 10},
//{"margin", "10 20 30 40"},//widget allocation
//{"text-align", "right"},//not works here
//{"text-padding", 20},
//{"border-radius", 3},//rounded
//{"height", 100},
{"update-on-release-only", true}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment