view UI code/TextPanel.h @ 0:a223551fdc1f

First commit - copy from tweakathlon.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 10 Oct 2014 11:46:42 +0100
parents
children 8124f46eda65
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;
    
    bool handleMyTouch(int x, int y, touchType ttype, int touchID){
        return false;
    }

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

#endif /* defined(__tweakathlon__TextPanel__) */