comparison UI code/CountdownText.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 // CountdownText.mm
3 // tweakathlon
4 //
5 // Created by Robert Tubb on 10/03/2014.
6 //
7 //
8
9 #include "CountdownText.h"
10
11 CountdownText::CountdownText(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(&CountdownText::secPassed, this);
24 };
25
26 //------------------------------------------------------------------
27 void CountdownText::draw(){
28 if (hidden) return;
29 UIElement::draw(); // should do background?
30 ofSetColor(foregroundHi);
31
32 verdana16.drawString(testTypeString, x, y + 8);
33
34
35 verdana16.drawString("STARTING IN...", x, y + 108);
36 bigFont.drawString(numSecondsText, x, y + 160);
37
38
39 //ofRect(x,y,width,height);
40 }
41 //------------------------------------------------------------------