//-------------------------------------------------------------- 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", "")); } }
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"); }