Utility new min/max clearing now an option in GUI
Also, tripod Spacebrew names are unique "Active Tripod" + appId
This commit is contained in:
@@ -82,6 +82,9 @@ void GUI::addGraphDesignGUI()
|
||||
ofxUICanvas* gui = getNewGUI(title);
|
||||
|
||||
gui->addToggle("Toggle Graph animation", &Graph::isAnimating, toggleDim, toggleDim);
|
||||
gui->addToggle("Toggle New Min/Max clear", &Graph::isClearOnNewMinMax, toggleDim, toggleDim);
|
||||
gui->addSpacer(length, 1);
|
||||
|
||||
gui->addToggle("Toggle Draw Body", &Graph::isDrawBody, toggleDim, toggleDim);
|
||||
gui->addToggle("Toggle Draw Lines", &Graph::isDrawLines, toggleDim, toggleDim);
|
||||
gui->addToggle("Toggle Clamp Y Values", &Graph::isClampYValues, toggleDim, toggleDim);
|
||||
|
||||
@@ -27,6 +27,7 @@ float Graph::textY;
|
||||
ofPoint Graph::textPnt;
|
||||
|
||||
bool Graph::isAnimating;
|
||||
bool Graph::isClearOnNewMinMax;
|
||||
|
||||
Graph::Graph(int _graphID)
|
||||
{
|
||||
@@ -179,9 +180,12 @@ void Graph::addNewData(DataObject newData)
|
||||
if (newData.min == -999) newData.min = 0;
|
||||
if (newData.max == -999) newData.max = 0;
|
||||
|
||||
if (newData.min != currentMin || newData.max != currentMax)
|
||||
if (isClearOnNewMinMax)
|
||||
{
|
||||
if (graphMesh.getVertices().size() > 0) clear();
|
||||
if (newData.min != currentMin || newData.max != currentMax)
|
||||
{
|
||||
if (graphMesh.getVertices().size() > 0) clear();
|
||||
}
|
||||
}
|
||||
|
||||
currentValue = newData.value;
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
static float textY;
|
||||
static ofPoint textPnt;
|
||||
static bool isAnimating;
|
||||
static bool isClearOnNewMinMax;
|
||||
|
||||
float col0[4];
|
||||
|
||||
@@ -69,7 +70,6 @@ public:
|
||||
float currentValue;
|
||||
float currentMin;
|
||||
float currentMax;
|
||||
|
||||
|
||||
float millisSinceLastPoint;
|
||||
float millisGap;
|
||||
|
||||
Reference in New Issue
Block a user