Mercurial > hg > tweakathon2ios
annotate UI code/textLabel.mm @ 52:89944ab3e129 tip
fix oF linker errors ios8
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Tue, 03 Feb 2015 13:18:23 +0000 |
parents | a223551fdc1f |
children |
rev | line source |
---|---|
rt300@0 | 1 // |
rt300@0 | 2 // textLabel.cpp |
rt300@0 | 3 // tweakathlon |
rt300@0 | 4 // |
rt300@0 | 5 // Created by Robert Tubb on 10/02/2014. |
rt300@0 | 6 // |
rt300@0 | 7 // |
rt300@0 | 8 |
rt300@0 | 9 #include "textLabel.h" |
rt300@0 | 10 |
rt300@0 | 11 TextLabel::TextLabel(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(&TextLabel::secPassed, this); |
rt300@0 | 24 }; |
rt300@0 | 25 |
rt300@0 | 26 //------------------------------------------------------------------ |
rt300@0 | 27 void TextLabel::draw(){ |
rt300@0 | 28 if (hidden) return; |
rt300@0 | 29 UIElement::draw(); // should do background |
rt300@0 | 30 ofSetColor(foregroundHi); |
rt300@0 | 31 verdana16.drawString("NEXT TEST IN...", x, y + 8); |
rt300@0 | 32 bigFont.drawString(labelName, x, y + 60); |
rt300@0 | 33 |
rt300@0 | 34 |
rt300@0 | 35 //ofRect(x,y,width,height); |
rt300@0 | 36 } |
rt300@0 | 37 //------------------------------------------------------------------ |