Mercurial > hg > tweakathon2ios
comparison UI code/3Dbox.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 | 953db6518738 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a223551fdc1f |
---|---|
1 // | |
2 // 3Dbox.cpp | |
3 // tweakathlon | |
4 // | |
5 // Created by Robert Tubb on 13/02/2014. | |
6 // | |
7 // | |
8 | |
9 #include "3Dbox.h" | |
10 | |
11 Leap3DBox::Leap3DBox(float ax, | |
12 float ay, | |
13 float awidth, | |
14 float aheight, | |
15 float azx, | |
16 float azy, | |
17 const UIProps& props) : | |
18 UIElement(ax,ay,awidth, aheight, props) | |
19 { | |
20 zx = azx; | |
21 zy = -azy; // cos of stoopid screen coords | |
22 init(props); | |
23 } | |
24 | |
25 void Leap3DBox::init(const UIProps& props){ | |
26 minVal = 0.; | |
27 maxVal = 127.; | |
28 xVal = 0.1; | |
29 yVal = 0.1; | |
30 zVal = 0.1; | |
31 | |
32 thickness = props.borderThickness; | |
33 foregroundHi = props.buttonHi; | |
34 backgroundHi = props.generalBackground; | |
35 foregroundLo = props.buttonLo; | |
36 backgroundLo = props.generalBackground; | |
37 fgInactive = props.inactiveGreyedOut; | |
38 hintShowing = false; | |
39 on = false; | |
40 | |
41 myType = LEAP3D; | |
42 } |