rt300@0: // rt300@0: // globalUI.h rt300@0: // Wablet rt300@0: // rt300@0: // Created by Robert Tubb on 19/03/2012. rt300@0: // Copyright (c) 2012 __MyCompanyName__. All rights reserved. rt300@0: // rt300@0: rt300@0: #ifndef Wablet_globalUI_h rt300@0: #define Wablet_globalUI_h rt300@0: rt300@0: #include "ofMain.h" rt300@0: #include "button.h" rt300@0: #include"mesh.h" rt300@0: #include "uifunctor.h" rt300@0: rt300@0: class testApp; rt300@0: rt300@0: class GlobalUI{ rt300@0: rt300@0: public: rt300@0: ofColor red; rt300@0: ofColor blue; rt300@0: ofColor green; rt300@0: rt300@0: int borderSize; // size of the button strips to left and right rt300@0: int buttonSize; // sqr button size in pixels rt300@0: rt300@0: enum touchModes {GRAB,FORCE_FIELD,SPATIAL_HARMONIC,CONSTRAIN,UNCONSTRAIN,VIBRATE,INSCRIBE_PATH}; rt300@0: rt300@0: touchModes touchMode; rt300@0: rt300@0: int numButtons; rt300@0: rt300@0: ControlButton **buttons; rt300@0: rt300@0: GlobalUI(); rt300@0: rt300@0: UIFunctor *theFunctor; rt300@0: Mesh *theMeshPtr; rt300@0: void passCallBack(UIFunctor specFuncA); rt300@0: rt300@0: void makeButtons(Mesh *atheMeshPtr); rt300@0: void draw(); rt300@0: rt300@0: bool handleTouchDown(int ax, int ay); rt300@0: bool handleTouchUp(int ax, int ay); rt300@0: bool handleTouchMove(int ax, int ay); rt300@0: rt300@0: private: rt300@0: bool inUIZone(float ax, float ay); rt300@0: rt300@0: }; rt300@0: rt300@0: #endif