view UI code/TextPanel.h @ 28:953db6518738

leap version more or less there, needs btter results feedback but thats detail. "no movement" bit is stupid cos peopel can move their hand. light flash not work.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 30 Oct 2014 18:35:00 +0000
parents 8124f46eda65
children
line wrap: on
line source

#ifndef __tweakathlon__TextPanel__
#define __tweakathlon__TextPanel__

#include <iostream>
#include "ofMain.h"
#include "UIElement.h"
#include "boost/function.hpp"
#include "boost/bind.hpp"

class TextPanel : public UIElement{
public:
    
    TextPanel(string text, int x, int y,int w,int h, const UIProps& props);
    void draw();
    
    void setText(string at){
        theText = at;
    };
    void setColor(ofColor col){
        foregroundHi = col;
    }
    void setFontSize(FontSize f){
        fontSize = f;
    }
    ofColor foregroundHi;
    ofColor backgroundHi;
    ofColor foregroundLo;
    ofColor backgroundLo;
    
    void setBackground(ofColor c){
        backgroundHi = c;
        backgroundLo = c;
        
    }
    bool handleMyTouch(int x, int y, touchType ttype, int touchID){
        return false;
    }

private:
    string theText;
    bool transparent;
    FontSize fontSize;
};

#endif /* defined(__tweakathlon__TextPanel__) */