comparison UI code/Buttron.mm @ 44:d810aa9ca03a

times. cosmetic stuff
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 15 Dec 2014 17:33:41 +0000
parents fea11c3d1d94
children
comparison
equal deleted inserted replaced
43:4ad0d218f890 44:d810aa9ca03a
51 backgroundHi = props.backgroundHi; 51 backgroundHi = props.backgroundHi;
52 foregroundLo = props.buttonLo; 52 foregroundLo = props.buttonLo;
53 backgroundLo = props.generalBackground; 53 backgroundLo = props.generalBackground;
54 behaviourMode = MOMENTARY; 54 behaviourMode = MOMENTARY;
55 on = false; 55 on = false;
56 bgImage = NULL;
56 } 57 }
57 //------------------------------------------------------------------ 58 //------------------------------------------------------------------
58 Buttron::Buttron(float ax, 59 Buttron::Buttron(float ax,
59 float ay, 60 float ay,
60 float awidth, 61 float awidth,
82 83
83 ofDisableDepthTest(); 84 ofDisableDepthTest();
84 //cout << "drawing button" << endl; 85 //cout << "drawing button" << endl;
85 ofFill(); 86 ofFill();
86 UIElement::draw(); // should do background 87 UIElement::draw(); // should do background
88 //drawBackground();
87 drawOutline(); 89 drawOutline();
88 drawTextLabel(); 90 drawTextLabel();
89 91
90 ofEnableDepthTest(); 92 ofEnableDepthTest();
91 } 93 }
163 ofCircle(x+cornerSize, y+height-cornerSize, radius); 165 ofCircle(x+cornerSize, y+height-cornerSize, radius);
164 166
165 ofCircle(x+width-cornerSize, y+height-cornerSize, radius); 167 ofCircle(x+width-cornerSize, y+height-cornerSize, radius);
166 168
167 // fill in background 169 // fill in background
170
168 ofRect(x+cornerSize,y+thickness,width-2*cornerSize,height-2*thickness); 171 ofRect(x+cornerSize,y+thickness,width-2*cornerSize,height-2*thickness);
169 ofRect(x+thickness, y+cornerSize, radius, height-2*cornerSize); 172 ofRect(x+thickness, y+cornerSize, radius, height-2*cornerSize);
170 ofRect(x+width-cornerSize, y+cornerSize, radius, height-2*cornerSize); 173 ofRect(x+width-cornerSize, y+cornerSize, radius, height-2*cornerSize);
171 174
172 175