view UI code/UIProperties.h @ 39:96ff7b41923a

tweaking
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 04 Dec 2014 18:32:32 +0000
parents fea11c3d1d94
children 4ad0d218f890
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 backgroundHi;
    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,210,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);
        backgroundHi = ofColor(50,80,60,255);
    };
};