view UI code/CountdownText.mm @ 28:953db6518738

leap version more or less there, needs btter results feedback but thats detail. "no movement" bit is stupid cos peopel can move their hand. light flash not work.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 30 Oct 2014 18:35:00 +0000
parents a223551fdc1f
children
line wrap: on
line source
//
//  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);
}
//------------------------------------------------------------------