Mercurial > hg > tweakathon2ios
diff UI code/sliderPanel.h @ 21:5cf2b80909fc
Hints and sliders show ok for training sequences.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Wed, 22 Oct 2014 18:12:12 +0100 |
parents | f83635861187 |
children | 8124f46eda65 |
line wrap: on
line diff
--- a/UI code/sliderPanel.h Wed Oct 22 16:47:11 2014 +0100 +++ b/UI code/sliderPanel.h Wed Oct 22 18:12:12 2014 +0100 @@ -22,6 +22,7 @@ #include "ButtronXY.h" #include "3Dbox.h" #include "3DboxGL.h" +#include "ButtronSlider.h" // panel with sliders and xy pads class SliderPanel : public UIElementContainer{ @@ -36,16 +37,18 @@ void showHint(bool value){ vector<UIElement *>::iterator UIitr; for(UIitr = subElements.begin(); UIitr < subElements.end(); UIitr++){ - (*UIitr)->showHint(value); + + ButtronSlider* thisSlider = (ButtronSlider *)(*UIitr); + thisSlider->showHint(value); } } // void setHintValues(vector<int> vals){ - auto valItr = vals.begin(); + int i = 0; for(auto UIitr = subElements.begin(); UIitr < subElements.end(); UIitr++){ - if (++valItr != vals.end()){ - (*UIitr)->setHintValue(*valItr); - } + ButtronSlider* thisSlider = (ButtronSlider *)(*UIitr); + thisSlider->setHintValue(vals[i]); + i++; } } void setHintColor(ofColor c){