コード例 #1
0
ファイル: gui.hpp プロジェクト: miguelespada/lescer_viewer
    //--------------------------------------------------------------
    void init(){

        gui.add(name.setup("Paciente", name));
        gui.add(exercice.setup("Ejercicio", exercice));
        gui.add(timestamp.setup("Fecha", timestamp));

        gui.add(counter.setup("Frames", counter));
        trace = 400;
        if(Assets::getInstance()->isViewer()){
            gui.add(index.setup("Posicion", index));
            gui.add(playback_speed.setup( "speed",  2, 1, 20));
            gui.add(trace.setup( "trace",  400, 100, 5000 ));
        }
        else{

            gui.add(calibrate.setup("Calibrar"));
            gui.add(clear.setup("Limpiar"));


            calibrate.addListener(this,&Gui::calibratedPressed);
            clear.addListener(this,&Gui::clearPressed);


            setasPanel.add(current.setup("Frutas", ""));
            setasPanel.add(time.setup("Tiempo", ""));
            setasPanel.add(setasLife.setup( "Maxima vida frutas", ""));
            setasPanel.add(code.setup("Code", ""));

        }
    }
コード例 #2
0
ファイル: main.cpp プロジェクト: UnforeseenOcean/Highsight
    void setup() {
        ofBackground(255);
        ofSetFrameRate(60);
        
        config.load("config.xml");
        defaultLength = config.getFloatValue("cable/length/default");
        minLength = config.getFloatValue("cable/length/min");
        maxLength = config.getFloatValue("cable/length/max");
        host = config.getValue("osc/host");
        sendPort = config.getIntValue("osc/sendPort");
        receivePort = config.getIntValue("osc/receive");
        
        oscSend.setup(host, sendPort);
        oscReceive.setup(receivePort);
        
        local.setup("Local");
        remote.setup("Remote");
        
        zeros.setup("Zeros");
        zeros.add(nwZero.setup("NW Zero"));
        zeros.add(neZero.setup("NE Zero"));
        zeros.add(seZero.setup("SE Zero"));
        zeros.add(swZero.setup("SW Zero"));

        nwZero.addListener(this, &ofApp::zeroNW);
        neZero.addListener(this, &ofApp::zeroNE);
        seZero.addListener(this, &ofApp::zeroSE);
        swZero.addListener(this, &ofApp::zeroSW);
        
        local.gui.loadFromFile("settings.xml");
        
        local.gui.setPosition(10, 10);
        zeros.setPosition(10, 200);
        remote.gui.setPosition(10, 310);
        
    }
コード例 #3
0
ファイル: main.cpp プロジェクト: cherrysiminlin/ofSketch
void setup() {
	ofSetVerticalSync(true);
	ofSetWindowShape(1024, 768);

	// we add this listener before setting up so the initial circle resolution is correct
	circleResolution.addListener(this, &ofApp::circleResolutionChanged);
	ringButton.addListener(this,&ofApp::ringButtonPressed);

	gui.setup(); // most of the time you don't need a name
	gui.add(filled.setup("fill", true));
	gui.add(radius.setup( "radius", 140, 10, 300 ));
	gui.add(center.setup("center",ofVec2f(ofGetWidth()*.5,ofGetHeight()*.5),ofVec2f(0,0),ofVec2f(ofGetWidth(),ofGetHeight())));
	gui.add(color.setup("color",ofColor(100,100,140),ofColor(0,0),ofColor(255,255)));
	gui.add(circleResolution.setup("circle res", 5, 3, 90));
	gui.add(twoCircles.setup("two circles"));
	gui.add(ringButton.setup("ring"));
	gui.add(screenSize.setup("screen size", ""));

	bHide = true;

	ring.loadSound("ring.wav");
}