rt300@0
|
1 //
|
rt300@0
|
2 // sliderPanel.h
|
rt300@0
|
3 // tweakathlon
|
rt300@0
|
4 //
|
rt300@0
|
5 // Created by Robert Tubb on 11/02/2014.
|
rt300@0
|
6 //
|
rt300@0
|
7 //
|
rt300@0
|
8
|
rt300@0
|
9 #ifndef __tweakathlon__sliderPanel__
|
rt300@0
|
10 #define __tweakathlon__sliderPanel__
|
rt300@0
|
11
|
rt300@0
|
12 #include <iostream>
|
rt300@0
|
13 #include "UIElementContainer.h"
|
rt300@0
|
14 #include <iostream>
|
rt300@0
|
15 #include "globalVariables.h"
|
rt300@0
|
16 #include "ofMain.h"
|
rt300@0
|
17 #include "UIElement.h"
|
rt300@0
|
18 #include "boost/bind.hpp"
|
rt300@0
|
19 #include "boost/function.hpp"
|
rt300@0
|
20 #include "timeController.h"
|
rt300@0
|
21 #include "ButtronSlider.h"
|
rt300@0
|
22 #include "ButtronXY.h"
|
rt300@0
|
23 #include "3Dbox.h"
|
rt300@0
|
24 #include "3DboxGL.h"
|
rt300@27
|
25 #include "6Dbox.h"
|
rt300@21
|
26 #include "ButtronSlider.h"
|
rt300@0
|
27 // panel with sliders and xy pads
|
rt300@27
|
28
|
rt300@27
|
29 // AND 6DOF BOXES !!!!!
|
rt300@0
|
30 class SliderPanel : public UIElementContainer{
|
rt300@0
|
31
|
rt300@0
|
32 public:
|
rt300@0
|
33 SliderPanel(float ax,
|
rt300@0
|
34 float ay,
|
rt300@0
|
35 float awidth,
|
rt300@0
|
36 float aheight,
|
rt300@0
|
37 const UIProps& aprops,
|
rt300@0
|
38 vector<controllerType> elemList);
|
rt300@27
|
39
|
rt300@27
|
40 void setAndShowHint(vector<int> values, ofImage* texture);
|
rt300@31
|
41 void setHintNoShow(vector<int> values, ofImage* texture);
|
rt300@27
|
42
|
rt300@27
|
43 void showHint(bool value);
|
rt300@0
|
44 //
|
rt300@27
|
45 void setHintValues(vector<int> vals);
|
rt300@28
|
46 void setValues(vector<int> vals);
|
rt300@27
|
47 void setHintColor(ofColor c);
|
rt300@27
|
48 void setSliderColors(ofColor c);
|
rt300@27
|
49 void flash();
|
rt300@27
|
50 void setBgColor(ofColor c);
|
rt300@0
|
51 vector<UIElement*> generateControls(vector<controllerType> elemList, controlPanelType panelType);
|
rt300@27
|
52
|
rt300@27
|
53 UIElement* getSlider(int index);
|
rt300@27
|
54 void setHintTexture(ofImage* texture);
|
rt300@37
|
55 void setIndicatorTexture(ofImage* texture = NULL);
|
rt300@28
|
56 void animateToNewHintValues(vector<int> newTargetValues, float timeToTake, ofImage* newTexture);
|
rt300@31
|
57 void animateToNewValues(vector<int> newTargetValues, float timeToTake);
|
rt300@27
|
58 void showValueIndicators(bool show);
|
rt300@28
|
59 void update();
|
rt300@28
|
60 controlPanelType getPanelType(){
|
rt300@28
|
61 return thisPanelType;
|
rt300@28
|
62 }
|
rt300@28
|
63 void flashResultLight(ofColor c, int howLong);
|
rt300@28
|
64 void turnOffResultLight();
|
rt300@0
|
65 private:
|
rt300@0
|
66 bool flashing;
|
rt300@27
|
67 controlPanelType thisPanelType;
|
rt300@28
|
68 bool animating;
|
rt300@28
|
69 ofLight resultLight;
|
rt300@0
|
70 };
|
rt300@0
|
71
|
rt300@0
|
72 #endif /* defined(__tweakathlon__sliderPanel__) */
|