view UI code/sliderPanel.h @ 42:2bd658b44c2d

buttons dont lite up back to menu shows in more appropriate times
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 08 Dec 2014 18:29:10 +0000
parents 52dbd5b4cfa9
children
line wrap: on
line source
//
//  sliderPanel.h
//  tweakathlon
//
//  Created by Robert Tubb on 11/02/2014.
//
//

#ifndef __tweakathlon__sliderPanel__
#define __tweakathlon__sliderPanel__

#include <iostream>
#include "UIElementContainer.h"
#include <iostream>
#include "globalVariables.h"
#include "ofMain.h"
#include "UIElement.h"
#include "boost/bind.hpp"
#include "boost/function.hpp"
#include "timeController.h"
#include "ButtronSlider.h"
#include "ButtronXY.h"
#include "3Dbox.h"
#include "3DboxGL.h"
#include "6Dbox.h"
#include "ButtronSlider.h"
// panel with sliders and xy pads

// AND 6DOF BOXES !!!!!
class SliderPanel : public UIElementContainer{
    
public:
    SliderPanel(float ax,
                float ay,
                float awidth,
                float aheight,
                const UIProps& aprops,
                vector<controllerType> elemList);
 
    void setAndShowHint(vector<int> values, ofImage* texture);
    void setHintNoShow(vector<int> values, ofImage* texture);
    
    void showHint(bool value);
    //
    void setHintValues(vector<int> vals);
    void setValues(vector<int> vals);
    void setHintColor(ofColor c);
    void setSliderColors(ofColor c);
    void flash();
    void setBgColor(ofColor c);
    vector<UIElement*> generateControls(vector<controllerType> elemList, controlPanelType panelType);

    UIElement* getSlider(int index);
    void setHintTexture(ofImage* texture);
    void setIndicatorTexture(ofImage* texture = NULL);
    void animateToNewHintValues(vector<int> newTargetValues, float timeToTake, ofImage* newTexture);
    void animateToNewValues(vector<int> newTargetValues, float timeToTake);
    void showValueIndicators(bool show);
    void update();
    controlPanelType getPanelType(){
        return thisPanelType;
    }
    void flashResultLight(ofColor c, int howLong);
    void turnOffResultLight();
private:
    bool flashing;
    controlPanelType thisPanelType;
    bool animating;
    ofLight resultLight;
};

#endif /* defined(__tweakathlon__sliderPanel__) */