HUD hole size based on percentage not pixels
This commit is contained in:
parent
2874d497b4
commit
73081efcd2
Binary file not shown.
@ -65,13 +65,13 @@
|
|||||||
</Widget>
|
</Widget>
|
||||||
<Widget>
|
<Widget>
|
||||||
<Kind>4</Kind>
|
<Kind>4</Kind>
|
||||||
<Name>Radius Width</Name>
|
<Name>Hole Width Percent</Name>
|
||||||
<Value>829.532897949</Value>
|
<Value>0.875000000</Value>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget>
|
<Widget>
|
||||||
<Kind>4</Kind>
|
<Kind>4</Kind>
|
||||||
<Name>Radius Height</Name>
|
<Name>Hole Height Percent</Name>
|
||||||
<Value>612.536193848</Value>
|
<Value>1.019736886</Value>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget>
|
<Widget>
|
||||||
<Kind>4</Kind>
|
<Kind>4</Kind>
|
||||||
|
|||||||
@ -16,6 +16,6 @@
|
|||||||
<Widget>
|
<Widget>
|
||||||
<Kind>6</Kind>
|
<Kind>6</Kind>
|
||||||
<Name>Graph X begin/end (percent)</Name>
|
<Name>Graph X begin/end (percent)</Name>
|
||||||
<HighValue>0.838815808</HighValue>
|
<HighValue>0.786184192</HighValue>
|
||||||
<LowValue>0.069078945</LowValue>
|
<LowValue>0.059210528</LowValue>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|||||||
@ -162,8 +162,8 @@ void GUI::addBackgroundGUI()
|
|||||||
gui->addSlider("Green .", 0, 255, &app->scene.hudColour[1], length, dim);
|
gui->addSlider("Green .", 0, 255, &app->scene.hudColour[1], length, dim);
|
||||||
gui->addSlider("Blue .", 0, 255, &app->scene.hudColour[2], length, dim);
|
gui->addSlider("Blue .", 0, 255, &app->scene.hudColour[2], length, dim);
|
||||||
gui->addSlider("Alpha .", 0, 255, &app->scene.hudColour[3], length, dim);
|
gui->addSlider("Alpha .", 0, 255, &app->scene.hudColour[3], length, dim);
|
||||||
gui->addSlider("Radius Width", 1, 2000, &app->scene.radiusW, length, dim);
|
gui->addSlider("Hole Width Percent", 0, 2, &app->scene.hudHoleWidthPercentage, length, dim);
|
||||||
gui->addSlider("Radius Height", 1, 2000, &app->scene.radiusH, length, dim);
|
gui->addSlider("Hole Height Percent", 0, 2, &app->scene.hudHoleHeightPercentage, length, dim);
|
||||||
gui->addSlider("Circle Point Size", 0, 100, &app->scene.circlePointSize, length, dim);
|
gui->addSlider("Circle Point Size", 0, 100, &app->scene.circlePointSize, length, dim);
|
||||||
|
|
||||||
ofAddListener(gui->newGUIEvent, this, &GUI::variousGUIEvent);
|
ofAddListener(gui->newGUIEvent, this, &GUI::variousGUIEvent);
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
// - Make HUD BG hole size a percentage rather than pixels
|
// - 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
|
// - 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 system to slow down data - The screen should show 15-20 minutes worth of data
|
||||||
// - add ability to remove the lines or body from body graph
|
|
||||||
// - Make 3rd graph - separate fade
|
// - Make 3rd graph - separate fade
|
||||||
// - Crosshairs in HUD
|
// - Crosshairs in HUD
|
||||||
// - Create graph animation system
|
// - Create graph animation system
|
||||||
|
|||||||
@ -77,6 +77,9 @@ void Scene::drawHUDBG()
|
|||||||
|
|
||||||
ofNextContour(true);
|
ofNextContour(true);
|
||||||
|
|
||||||
|
float radiusW = (ofGetWidth() * 0.5) * hudHoleWidthPercentage;
|
||||||
|
float radiusH = (ofGetHeight() * 0.5) * hudHoleHeightPercentage;
|
||||||
|
|
||||||
for (int i = 0; i < (int)circlePointSize; i++)
|
for (int i = 0; i < (int)circlePointSize; i++)
|
||||||
{
|
{
|
||||||
float x = (ofGetWidth() * 0.5) + cos(((float)i / (int)circlePointSize) * TWO_PI) * radiusW;
|
float x = (ofGetWidth() * 0.5) + cos(((float)i / (int)circlePointSize) * TWO_PI) * radiusW;
|
||||||
|
|||||||
@ -55,8 +55,8 @@ public:
|
|||||||
// HUD background vars
|
// HUD background vars
|
||||||
float hudColour[4];
|
float hudColour[4];
|
||||||
float circlePointSize;
|
float circlePointSize;
|
||||||
float radiusW;
|
float hudHoleWidthPercentage;
|
||||||
float radiusH;
|
float hudHoleHeightPercentage;
|
||||||
|
|
||||||
// text vars
|
// text vars
|
||||||
float xMargin;
|
float xMargin;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user