rt300@0
|
1 //
|
rt300@0
|
2 // CountdownText.mm
|
rt300@0
|
3 // tweakathlon
|
rt300@0
|
4 //
|
rt300@0
|
5 // Created by Robert Tubb on 10/03/2014.
|
rt300@0
|
6 //
|
rt300@0
|
7 //
|
rt300@0
|
8
|
rt300@0
|
9 #include "CountdownText.h"
|
rt300@0
|
10
|
rt300@0
|
11 CountdownText::CountdownText(string text, int ax, int ay,int aw,int ah, const UIProps& props):
|
rt300@0
|
12 UIElement(ax,ay,aw,ah, props)
|
rt300@0
|
13
|
rt300@0
|
14
|
rt300@0
|
15 {
|
rt300@0
|
16 labelName = text;
|
rt300@0
|
17 foregroundHi = props.buttonHi;
|
rt300@0
|
18 backgroundHi = props.generalBackground;
|
rt300@0
|
19 foregroundLo = props.buttonLo;
|
rt300@0
|
20 backgroundLo = props.generalBackground;
|
rt300@0
|
21 verdana16 = props.verdana16;
|
rt300@0
|
22 bigFont = props.bigFont;
|
rt300@0
|
23 tcb = boost::bind(&CountdownText::secPassed, this);
|
rt300@0
|
24 };
|
rt300@0
|
25
|
rt300@0
|
26 //------------------------------------------------------------------
|
rt300@0
|
27 void CountdownText::draw(){
|
rt300@0
|
28 if (hidden) return;
|
rt300@0
|
29 UIElement::draw(); // should do background?
|
rt300@0
|
30 ofSetColor(foregroundHi);
|
rt300@0
|
31
|
rt300@0
|
32 verdana16.drawString(testTypeString, x, y + 8);
|
rt300@0
|
33
|
rt300@0
|
34
|
rt300@0
|
35 verdana16.drawString("STARTING IN...", x, y + 108);
|
rt300@0
|
36 bigFont.drawString(numSecondsText, x, y + 160);
|
rt300@0
|
37
|
rt300@0
|
38
|
rt300@0
|
39 //ofRect(x,y,width,height);
|
rt300@0
|
40 }
|
rt300@0
|
41 //------------------------------------------------------------------ |