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