diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI code/3Dbox.mm	Fri Oct 10 11:46:42 2014 +0100
@@ -0,0 +1,42 @@
+//
+//  3Dbox.cpp
+//  tweakathlon
+//
+//  Created by Robert Tubb on 13/02/2014.
+//
+//
+
+#include "3Dbox.h"
+
+Leap3DBox::Leap3DBox(float ax,
+          float ay,
+          float awidth,
+          float aheight,
+          float azx,
+          float azy,
+          const UIProps& props) :
+UIElement(ax,ay,awidth, aheight, props)
+{
+    zx = azx;
+    zy = -azy; // cos of stoopid screen coords
+    init(props);
+}
+
+void Leap3DBox::init(const UIProps& props){
+    minVal = 0.;
+    maxVal = 127.;
+    xVal = 0.1;
+    yVal = 0.1;
+    zVal = 0.1;
+    
+    thickness = props.borderThickness;
+    foregroundHi = props.buttonHi;
+    backgroundHi = props.generalBackground;
+    foregroundLo = props.buttonLo;
+    backgroundLo = props.generalBackground;
+    fgInactive = props.inactiveGreyedOut;
+    hintShowing = false;
+    on = false;
+    
+    myType = LEAP3D;
+}
\ No newline at end of file