Create BoolProperty for PerformanceComponent

This commit is contained in:
Matthew Territo
2017-07-07 12:33:49 -06:00
parent 115bb998c9
commit 29fd158ed5
2 changed files with 5 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ protected:
properties::BoolProperty _sceneGraphIsEnabled;
properties::BoolProperty _functionsIsEnabled;
properties::BoolProperty _outputLogs;
};
} // namespace gui

View File

@@ -59,11 +59,13 @@ GuiPerformanceComponent::GuiPerformanceComponent()
, _sortingSelection("sortingSelection", "Sorting", -1, -1, 6)
, _sceneGraphIsEnabled("showSceneGraph", "Show Scene Graph Measurements", false)
, _functionsIsEnabled("showFunctions", "Show Function Measurements", false)
, _outputLogs("outputLogs", "Output Logs", false)
{
addProperty(_sortingSelection);
addProperty(_sceneGraphIsEnabled);
addProperty(_functionsIsEnabled);
addProperty(_outputLogs);
}
void GuiPerformanceComponent::render() {
@@ -81,9 +83,10 @@ void GuiPerformanceComponent::render() {
v = _functionsIsEnabled;
ImGui::Checkbox("Functions", &v);
_functionsIsEnabled = v;
v = OsEng.renderEngine().performanceManager()->loggingEnabled();
v = _outputLogs;
ImGui::Checkbox("Output Logs", &v);
OsEng.renderEngine().performanceManager()->setLogging(v);
_outputLogs = v;
ImGui::Spacing();