view UI code/UIProperties.h @ 28:953db6518738

leap version more or less there, needs btter results feedback but thats detail. "no movement" bit is stupid cos peopel can move their hand. light flash not work.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 30 Oct 2014 18:35:00 +0000
parents 8124f46eda65
children fea11c3d1d94
line wrap: on
line source
#pragma once
#include <iostream>
#include "ofMain.h"
// this is all the default global colors and sizes for the UI, passed into uielement conststrutor

struct UIProps {
    
    int buttonWidth;
    int buttonHeight;
    
    int borderThickness;
    int cornerRadius;
    
    int sliderPanelWidth;
    int sliderPanelHeight;
    int spacerSize;
    int XYsize;
    
    int sliderWidth;
    int sliderHeight;
    float sliderMinVal;
    float sliderMaxVal;
    ofColor buttonLo;
    ofColor buttonHi;
    
    ofColor inactiveGreyedOut;
    
    ofColor sliderMultiActive;
    
    ofColor sliderSimulInactive;
    ofColor sliderSimulActive;
    
    ofColor generalBackground;
    ofColor borderColor;
    ofColor hintColor;
    
    ofTrueTypeFont verdana16;
    ofTrueTypeFont bigFont;
    ofTrueTypeFont smallFont;
    
    UIProps(){
        
        // LOAD FONT SLOW
        verdana16.loadFont("verdana.ttf", 14, true, true);
        verdana16.setLineHeight(18.0f);
        verdana16.setLetterSpacing(1.037);
        
        bigFont.loadFont("verdana.ttf", 28, true, true);
        bigFont.setLineHeight(30.0f);
        bigFont.setLetterSpacing(1.037);
        
        smallFont.loadFont("verdana.ttf", 10, true, true);
        smallFont.setLineHeight(11.0f);
        smallFont.setLetterSpacing(1.037);
        
        buttonWidth = 150;
        buttonHeight = 60;
        borderThickness = 5;
        cornerRadius = 7;
        
        sliderPanelWidth = ofGetWidth();
        sliderPanelHeight = 500;
        spacerSize = 40;
        XYsize = sliderPanelHeight - spacerSize*2;
        
        sliderWidth = XYsize/4;
        sliderHeight = XYsize;
        sliderMinVal = 0.   ;
        sliderMaxVal = 127.;
        
        borderColor = ofColor(123,200,180,180);
        hintColor = ofColor(255,0,0,255);
        
        buttonLo = ofColor(123,200,180,255);
        buttonHi = ofColor(150,235,200,255);
        
        inactiveGreyedOut = ofColor(78,78,78,255);
        
        sliderMultiActive = ofColor(255,255,0,255);
        
        sliderSimulInactive = ofColor(200,0,0,255);
        sliderSimulActive = ofColor(0,255,0,255);
        
        generalBackground = ofColor(23,23,23,255);
    };
};