view globalUI.h @ 15:d5758530a039 tip

oF0.84 Retina, and iPhone support
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 12 May 2015 15:48:52 +0100
parents c667dfe12d47
children
line wrap: on
line source
//
//  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