From ff074c936bfe197dc676f4ff8d5f3d99d5eb1b1d Mon Sep 17 00:00:00 2001 From: random Date: Tue, 18 Jul 2017 13:58:45 +0200 Subject: [PATCH] removes 'addRangeSlider' for consistency, use add' --- exampleAdvancedGui/src/ofApp.cpp | 4 +++- src/containers/ofxGuiContainer.h | 9 --------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/exampleAdvancedGui/src/ofApp.cpp b/exampleAdvancedGui/src/ofApp.cpp index c92727b..8a34ddc 100644 --- a/exampleAdvancedGui/src/ofApp.cpp +++ b/exampleAdvancedGui/src/ofApp.cpp @@ -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(rangesliderStart, rangesliderEnd, ofJson({{"precision", 2}})); /* * ofParameterGroup example with radio toggles, listener to show current index and name diff --git a/src/containers/ofxGuiContainer.h b/src/containers/ofxGuiContainer.h index 0285402..05c5e97 100644 --- a/src/containers/ofxGuiContainer.h +++ b/src/containers/ofxGuiContainer.h @@ -66,9 +66,6 @@ class ofxGuiContainer : public ofxGuiElement { ofxGuiElement* addSpacer(const ofJson & config = ofJson()); ofxGuiFpsPlotter* addFpsPlotter(const ofJson & config = ofJson()); - template - typename std::enable_if::value, ofxGuiRangeSlider*>::type addRangeSlider(ofParameter & pStart, ofParameter & 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()); @@ -176,9 +173,3 @@ template typename std::enable_if::value, ofxGuiSlider*>::type ofxGuiContainer::add(ofParameter & p, const ofJson & config){ return add>(p,config); } - -template -typename std::enable_if::value, ofxGuiRangeSlider*>::type ofxGuiContainer::addRangeSlider(ofParameter & pStart, ofParameter & pEnd, const ofJson & config){ - return add>(pStart, pEnd, config); -} -