Mercurial > hg > tweakathon2ios
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a223551fdc1f |
---|---|
1 | |
2 #ifndef __tweakathlon__TextPanel__ | |
3 #define __tweakathlon__TextPanel__ | |
4 | |
5 #include <iostream> | |
6 #include "ofMain.h" | |
7 #include "UIElement.h" | |
8 #include "boost/function.hpp" | |
9 #include "boost/bind.hpp" | |
10 | |
11 class TextPanel : public UIElement{ | |
12 public: | |
13 | |
14 TextPanel(string text, int x, int y,int w,int h, const UIProps& props); | |
15 void draw(); | |
16 | |
17 void setText(string at){ | |
18 theText = at; | |
19 }; | |
20 void setColor(ofColor col){ | |
21 foregroundHi = col; | |
22 } | |
23 void setFontSize(FontSize f){ | |
24 fontSize = f; | |
25 } | |
26 ofColor foregroundHi; | |
27 ofColor backgroundHi; | |
28 ofColor foregroundLo; | |
29 ofColor backgroundLo; | |
30 | |
31 bool handleMyTouch(int x, int y, touchType ttype, int touchID){ | |
32 return false; | |
33 } | |
34 | |
35 private: | |
36 string theText; | |
37 bool transparent; | |
38 FontSize fontSize; | |
39 }; | |
40 | |
41 #endif /* defined(__tweakathlon__TextPanel__) */ |