Mercurial > hg > wabletios
diff globalUI.h @ 0:c667dfe12d47
OK. Ther real deal.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 19 Nov 2012 13:00:42 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/globalUI.h Mon Nov 19 13:00:42 2012 +0000 @@ -0,0 +1,55 @@ +// +// globalUI.h +// Wablet +// +// Created by Robert Tubb on 19/03/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#ifndef Wablet_globalUI_h +#define Wablet_globalUI_h + +#include "ofMain.h" +#include "button.h" +#include"mesh.h" +#include "uifunctor.h" + +class testApp; + +class GlobalUI{ + +public: + ofColor red; + ofColor blue; + ofColor green; + + int borderSize; // size of the button strips to left and right + int buttonSize; // sqr button size in pixels + + enum touchModes {GRAB,FORCE_FIELD,SPATIAL_HARMONIC,CONSTRAIN,UNCONSTRAIN,VIBRATE,INSCRIBE_PATH}; + + touchModes touchMode; + + int numButtons; + + ControlButton **buttons; + + GlobalUI(); + + UIFunctor *theFunctor; + Mesh *theMeshPtr; + void passCallBack(UIFunctor specFuncA); + + void makeButtons(Mesh *atheMeshPtr); + void draw(); + + bool handleTouchDown(int ax, int ay); + bool handleTouchUp(int ax, int ay); + bool handleTouchMove(int ax, int ay); + +private: + bool inUIZone(float ax, float ay); + +}; + +#endif