From 29fd158ed52b6331c2761038b594ab20305d1651 Mon Sep 17 00:00:00 2001 From: Matthew Territo Date: Fri, 7 Jul 2017 12:33:49 -0600 Subject: [PATCH] Create BoolProperty for PerformanceComponent --- modules/onscreengui/include/guiperformancecomponent.h | 1 + modules/onscreengui/src/guiperformancecomponent.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/onscreengui/include/guiperformancecomponent.h b/modules/onscreengui/include/guiperformancecomponent.h index f81a072639..55827e3007 100644 --- a/modules/onscreengui/include/guiperformancecomponent.h +++ b/modules/onscreengui/include/guiperformancecomponent.h @@ -54,6 +54,7 @@ protected: properties::BoolProperty _sceneGraphIsEnabled; properties::BoolProperty _functionsIsEnabled; + properties::BoolProperty _outputLogs; }; } // namespace gui diff --git a/modules/onscreengui/src/guiperformancecomponent.cpp b/modules/onscreengui/src/guiperformancecomponent.cpp index 0fcd10a22f..4e8771d726 100644 --- a/modules/onscreengui/src/guiperformancecomponent.cpp +++ b/modules/onscreengui/src/guiperformancecomponent.cpp @@ -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();