diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 9a3bb74d..ea98c593 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11727,6 +11727,24 @@ void View::DrawStatistics() { m_statisticsFilter.Clear(); } + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + if( ImGui::Checkbox( "Limit range", &m_statRange.active ) ) + { + if( m_statRange.active && m_statRange.min == 0 && m_statRange.max == 0 ) + { + m_statRange.min = m_vd.zvStart; + m_statRange.max = m_vd.zvEnd; + } + } + if( m_statRange.active ) + { + ImGui::SameLine(); + TextColoredUnformatted( 0xFF00FFFF, ICON_FA_EXCLAMATION_TRIANGLE ); + ImGui::SameLine(); + ToggleButton( ICON_FA_RULER " Limits", m_showRanges ); + } ImGui::Separator(); ImGui::PopStyleVar(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 4ca0a4b6..fe68f536 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -353,7 +353,6 @@ private: bool m_messagesScrollBottom; ImGuiTextFilter m_messageFilter; bool m_showMessageImages = false; - ImGuiTextFilter m_statisticsFilter; int m_visibleMessages = 0; size_t m_prevMessages = 0; Vector m_msgList; @@ -363,6 +362,10 @@ private: Annotation* m_selectedAnnotation = nullptr; bool m_reactToCrash = false; + ImGuiTextFilter m_statisticsFilter; + Range m_statRange; + RangeSlim m_statRangeSlim; + Region m_highlight; Region m_highlightZoom;