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.
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.
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);
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!
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
Hey @frauzufall it looks super nice! thanks for sharing.
I’ll take a look at it and come back with some feedback.
cheers!
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)
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?