debug ui stub

This commit is contained in:
micuat 2020-10-26 11:02:10 +01:00
parent 577e093f96
commit 700fdfdff1
2 changed files with 15 additions and 1 deletions

View file

@ -123,6 +123,13 @@ void ofApp::setupGui()
gui.add(registrationScale.setup("scale", 2.0, 0.1, 3));
gui.add(captureDeviceName.setup("device", "video3"));
gui.loadFromFile("settings.xml");
gui.setPosition(10, 10);
debugGui.setup("DEBUG");
debugGui.add(dummyMode.setup("dummy", true)); // should be false
debugGui.add(dummyXY.setup("XY", {0, 0}, {-400, -400}, {400, 400})); // should be false
debugGui.add(debugFps.setup("FPS", "0"));
debugGui.setPosition(230, 10);
}
void ofApp::setup()
@ -205,6 +212,8 @@ void ofApp::update()
updateThermal();
particles.update();
debugFps = ofToString(ofGetFrameRate(), 2);
}
void ofApp::onParticlesUpdate(ofxShader &shader)
@ -265,7 +274,7 @@ void ofApp::drawMain()
void ofApp::drawDebug()
{
gui.draw();
ofDrawBitmapStringHighlight(ofToString(ofGetFrameRate(), 2) + " FPS", 10, 20);
debugGui.draw();
}
void ofApp::draw()

View file

@ -64,4 +64,9 @@ private:
ofxFloatSlider registrationScale;
ofxInputField<std::string> captureDeviceName;
ofxPanel gui;
ofxToggle dummyMode;
ofxVec2Slider dummyXY;
ofxLabel debugFps;
ofxPanel debugGui;
};