Mercurial > hg > tweakathon2ios
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UI code/CountdownText.mm Fri Oct 10 11:46:42 2014 +0100 @@ -0,0 +1,41 @@ +// +// CountdownText.mm +// tweakathlon +// +// Created by Robert Tubb on 10/03/2014. +// +// + +#include "CountdownText.h" + +CountdownText::CountdownText(string text, int ax, int ay,int aw,int ah, const UIProps& props): +UIElement(ax,ay,aw,ah, props) + + +{ + labelName = text; + foregroundHi = props.buttonHi; + backgroundHi = props.generalBackground; + foregroundLo = props.buttonLo; + backgroundLo = props.generalBackground; + verdana16 = props.verdana16; + bigFont = props.bigFont; + tcb = boost::bind(&CountdownText::secPassed, this); +}; + +//------------------------------------------------------------------ +void CountdownText::draw(){ + if (hidden) return; + UIElement::draw(); // should do background? + ofSetColor(foregroundHi); + + verdana16.drawString(testTypeString, x, y + 8); + + + verdana16.drawString("STARTING IN...", x, y + 108); + bigFont.drawString(numSecondsText, x, y + 160); + + + //ofRect(x,y,width,height); +} +//------------------------------------------------------------------ \ No newline at end of file