ofxGuiExtended updates

#1

Hi all,

starting a new thread where I want to post if I push something new to ofxGuiExtended.

Note that there are other threads (partly) addressing this addon, Extending ofxGui with new widgets and ofxGuiExtended Examples.

1 Like
#2

range slider

I recently added a really simple range slider, it’s demonstrated in exampleAdvancedGui (bottom left):

Usage:

ofParameter<float> rangesliderStart, rangesliderEnd;
rangesliderStart.set("range", 2, 0, 5); //set the name, the lower value of the range slider and min and max value here
rangesliderEnd.set(3); //set the upper value here

ofJson config = {{"show-value", false}, {"show-name", false}}; // config to hide text

panel->add<ofxGuiFloatRangeSlider>(rangesliderStart, rangesliderEnd, config);
1 Like
#3

menu

Just uploaded, a menu created with one line of code from an ofParameterGroup object.

Usage:

//ofApp.h

ofParameterGroup data;
ofParameter<ofRectangle> rectParameter;
ofParameter<ofColor> colorParameter;
ofParameter<ofPoint> pointParameter;
ofParameter<float> floatParameter;
ofParameter<std::string> labelParameter;
ofParameter<bool> boolParameter;
ofParameter<void> voidParameter;

ofxGui gui;
//ofApp.cpp

// initialize data with name, value, min, and max
data.add(labelParameter.set("std::string"));
data.add(voidParameter.set("void"));
data.add(boolParameter.set("bool", false));
data.add(floatParameter.set("float", 0.5,0,1));
data.add(pointParameter.set("ofPoint", ofPoint(0.5,0.5,0.5),ofPoint(0,0,0), ofPoint(1,1,1)));
data.add(colorParameter.set("ofColor", ofColor(255,255,0,255),ofColor(0,0,0,0), ofColor(255,255,255,255)));
data.add(rectParameter.set("ofRectangle", ofRectangle(100,100,100,100), ofRectangle(0,0,0,0), ofRectangle(ofGetWidth(), ofGetHeight(), ofGetWidth(), ofGetHeight())));

//create menu
gui.addMenu(data);

One should also be able to add menu items to other ofxGuiExtended interfaces (like from inside a panel), but I have not tested this yet.

Happy for feedback and criticism!

5 Likes
#4

Hi Frauzufall,

it looks everything great! This is a post about adding tooltips to ofxGui, there is also a simple working example.
@roymacdonald found it interesting and maybe you too.

cheers,

Paolo

1 Like
#5

Hey @frauzufall it looks super nice! thanks for sharing.
I’ll take a look at it and come back with some feedback.
cheers!

#6

Live theme updates

You can already apply a theme written in JSON to ofxGuiExtended via

container->loadTheme(filepath);

New: the theme can be updated on the fly once you edit and save the theme file so one does not have to restart the OF application to apply theme changes. Just change the code to

container->loadTheme(filepath, true);

(This method also helps a lot to find bugs in the current layout implementation, I already noticed a few… if you find one, please file an issue on github)

2 Likes
#7
#8

hey @frauzufall, the addon is working really nice in in MacOS. thanks for your work. I have some questions if you don’t mind…
Did you tried too on iOS or RPi?
it should performs slower in fps than ofxGui? Also, it’s there any way to use (with main branch) together with ofxGui?