Skip to content

Commit

Permalink
removes 'addRangeSlider' for consistency, use add<ofxGuiFloatRangeSli…
Browse files Browse the repository at this point in the history
…der>'
  • Loading branch information
frauzufall committed Jul 18, 2017
1 parent d1f9783 commit ff074c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 3 additions & 1 deletion exampleAdvancedGui/src/ofApp.cpp
Expand Up @@ -61,7 +61,9 @@ void ofApp::setup(){
/*
* range slider
*/
panel1->addRangeSlider(rangesliderStart.set("range",2,0,5), rangesliderEnd.set(3), ofJson({{"precision", 2}}));
rangesliderStart.set("range",2,0,5); //use the first parameter to set the initial lower value and the min and max value
rangesliderEnd.set(3); // use the second parameter to set the initial upper value
panel1->add<ofxGuiFloatRangeSlider>(rangesliderStart, rangesliderEnd, ofJson({{"precision", 2}}));

/*
* ofParameterGroup example with radio toggles, listener to show current index and name
Expand Down
9 changes: 0 additions & 9 deletions src/containers/ofxGuiContainer.h
Expand Up @@ -66,9 +66,6 @@ class ofxGuiContainer : public ofxGuiElement {
ofxGuiElement* addSpacer(const ofJson & config = ofJson());
ofxGuiFpsPlotter* addFpsPlotter(const ofJson & config = ofJson());

template<typename T>
typename std::enable_if<std::is_arithmetic<T>::value, ofxGuiRangeSlider<T>*>::type addRangeSlider(ofParameter<T> & pStart, ofParameter<T> & pEnd, const ofJson & config = ofJson());

ofxGuiContainer* addContainer(const std::string& name="", const ofJson& config = ofJson());
ofxGuiContainer* addContainer(const ofParameterGroup & parameters, const ofJson& config = ofJson());
ofxGuiGroup* addGroup(const std::string& name="", const ofJson& config = ofJson());
Expand Down Expand Up @@ -176,9 +173,3 @@ template<typename T>
typename std::enable_if<std::is_arithmetic<T>::value, ofxGuiSlider<T>*>::type ofxGuiContainer::add(ofParameter<T> & p, const ofJson & config){
return add<ofxGuiSlider<T>>(p,config);
}

template<typename T>
typename std::enable_if<std::is_arithmetic<T>::value, ofxGuiRangeSlider<T>*>::type ofxGuiContainer::addRangeSlider(ofParameter<T> & pStart, ofParameter<T> & pEnd, const ofJson & config){
return add<ofxGuiRangeSlider<T>>(pStart, pEnd, config);
}

0 comments on commit ff074c9

Please sign in to comment.