From 700fdfdff1c1a37cfad24b6fd2ea7516daa4466e Mon Sep 17 00:00:00 2001 From: micuat Date: Mon, 26 Oct 2020 11:02:10 +0100 Subject: [PATCH] debug ui stub --- zoneb/src/ofApp.cpp | 11 ++++++++++- zoneb/src/ofApp.h | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/zoneb/src/ofApp.cpp b/zoneb/src/ofApp.cpp index a803809..6863593 100644 --- a/zoneb/src/ofApp.cpp +++ b/zoneb/src/ofApp.cpp @@ -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() diff --git a/zoneb/src/ofApp.h b/zoneb/src/ofApp.h index 6deda36..b5a68c6 100644 --- a/zoneb/src/ofApp.h +++ b/zoneb/src/ofApp.h @@ -64,4 +64,9 @@ private: ofxFloatSlider registrationScale; ofxInputField captureDeviceName; ofxPanel gui; + + ofxToggle dummyMode; + ofxVec2Slider dummyXY; + ofxLabel debugFps; + ofxPanel debugGui; };