diff --git a/of/Active Tripod/bin/Active_Tripod.lib b/of/Active Tripod/bin/Active_Tripod.lib index cc9b6a9..66a1d2f 100644 Binary files a/of/Active Tripod/bin/Active_Tripod.lib and b/of/Active Tripod/bin/Active_Tripod.lib differ diff --git a/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml index f04304a..4fb43c0 100644 --- a/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml +++ b/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml @@ -1,12 +1,22 @@ 2 Toggle Video Visibility - 0 + 1 2 Toggle Image Visibility - 1 + 0 + + + 4 + Video/Image Width Percent + 0.875000000 + + + 4 + Video/Image Height Percent + 1.000000000 4 diff --git a/of/Active Tripod/src/gui/GUI.cpp b/of/Active Tripod/src/gui/GUI.cpp index 6a23e7d..ea2c87a 100644 --- a/of/Active Tripod/src/gui/GUI.cpp +++ b/of/Active Tripod/src/gui/GUI.cpp @@ -146,6 +146,10 @@ void GUI::addBackgroundGUI() gui->addToggle("Toggle Video Visibility", &app->scene.isVideoVisible, toggleDim, toggleDim); gui->addToggle("Toggle Image Visibility", &app->scene.isImageVisible, toggleDim, toggleDim); + gui->addSlider("Video/Image Width Percent", 0, 2, &app->scene.videoWidthPercentage, length, dim); + gui->addSlider("Video/Image Height Percent", 0, 2, &app->scene.videoHeightPercentage, length, dim); + + gui->addLabel("VIDEO IMAGE SETTINGS"); gui->addSlider("Brightness", 0, 2, &app->scene.brightness, length, dim); diff --git a/of/Active Tripod/src/testApp.cpp b/of/Active Tripod/src/testApp.cpp index b333e76..e9d7190 100644 --- a/of/Active Tripod/src/testApp.cpp +++ b/of/Active Tripod/src/testApp.cpp @@ -2,7 +2,6 @@ // TODO // ==== -// - Make HUD BG hole size a percentage rather than pixels // - Add option to resize video draw size (rather than making it fullscreen) and init size // - Make system to slow down data - The screen should show 15-20 minutes worth of data // - Make 3rd graph - separate fade diff --git a/of/Active Tripod/src/visual/Scene.cpp b/of/Active Tripod/src/visual/Scene.cpp index d4c08f2..c4c6c70 100644 --- a/of/Active Tripod/src/visual/Scene.cpp +++ b/of/Active Tripod/src/visual/Scene.cpp @@ -56,11 +56,17 @@ void Scene::drawVideo() rgbShader.setUniform1f("blue", blue); rgbShader.setUniform1f("alpha", alpha); + float vidW = ofGetWidth() * videoWidthPercentage; + float vidH = ofGetHeight() * videoHeightPercentage; + + ofPushMatrix(); + ofTranslate((ofGetWidth() - vidW) * 0.5, (ofGetHeight() - vidH) * 0.5); if (isVideoVisible) - vidGrabber.draw(0, 0, ofGetWidth(), ofGetHeight()); + vidGrabber.draw(0, 0, vidW, vidH); if (isImageVisible) - bgImg.draw(0, 0, ofGetWidth(), ofGetHeight()); - + bgImg.draw(0, 0, vidW, vidH); + ofPopMatrix(); + rgbShader.end(); } diff --git a/of/Active Tripod/src/visual/Scene.h b/of/Active Tripod/src/visual/Scene.h index a40634d..23681c0 100644 --- a/of/Active Tripod/src/visual/Scene.h +++ b/of/Active Tripod/src/visual/Scene.h @@ -49,6 +49,8 @@ public: float green; float blue; float alpha; + float videoWidthPercentage; + float videoHeightPercentage; bool isVideoVisible; bool isImageVisible;