rt300@0: // rt300@0: // button.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_button_h rt300@0: #define Wablet_button_h rt300@0: #include rt300@0: #include "ofMain.h" rt300@0: #include "mesh.h" rt300@0: #include "uifunctor.h" rt300@0: class testApp; rt300@0: rt300@0: class ControlButton{ rt300@0: rt300@0: public: rt300@0: ofColor bcolor, hicolor; rt300@0: rt300@0: bool pressed; rt300@0: int width, height, xpos, ypos; rt300@0: std::string name; rt300@0: Mesh *theMesh; rt300@0: int buttonId; rt300@0: ControlButton(int abuttonId,int awidth,int aheight,int axpos,int aypos, std::string aname, Mesh *atheMeshPtr, ofColor acolor); rt300@0: ~ControlButton(); rt300@0: void passCallBack(UIFunctor callBack); rt300@0: void draw(); rt300@0: bool checkTouchArea(int axpos,int aypos); rt300@0: void press(); rt300@0: void release(); rt300@0: }; rt300@0: rt300@0: rt300@0: #endif