Mercurial > hg > tweakathon2ios
view UI code/TextPanel.h @ 38:fea11c3d1d94
tweaking endlessly
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Thu, 04 Dec 2014 17:03:01 +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__) */