Mercurial > hg > tweakathon2ios
comparison UI code/textLabel.mm @ 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a223551fdc1f |
---|---|
1 // | |
2 // textLabel.cpp | |
3 // tweakathlon | |
4 // | |
5 // Created by Robert Tubb on 10/02/2014. | |
6 // | |
7 // | |
8 | |
9 #include "textLabel.h" | |
10 | |
11 TextLabel::TextLabel(string text, int ax, int ay,int aw,int ah, const UIProps& props): | |
12 UIElement(ax,ay,aw,ah, props) | |
13 | |
14 | |
15 { | |
16 labelName = text; | |
17 foregroundHi = props.buttonHi; | |
18 backgroundHi = props.generalBackground; | |
19 foregroundLo = props.buttonLo; | |
20 backgroundLo = props.generalBackground; | |
21 verdana16 = props.verdana16; | |
22 bigFont = props.bigFont; | |
23 tcb = boost::bind(&TextLabel::secPassed, this); | |
24 }; | |
25 | |
26 //------------------------------------------------------------------ | |
27 void TextLabel::draw(){ | |
28 if (hidden) return; | |
29 UIElement::draw(); // should do background | |
30 ofSetColor(foregroundHi); | |
31 verdana16.drawString("NEXT TEST IN...", x, y + 8); | |
32 bigFont.drawString(labelName, x, y + 60); | |
33 | |
34 | |
35 //ofRect(x,y,width,height); | |
36 } | |
37 //------------------------------------------------------------------ |