From 9fb26b362262c049a2bad5c9e07eee0c5d0561a5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 3 Sep 2018 20:36:40 +0200 Subject: [PATCH] If there's no group selected, dim group selection legend. --- server/TracyView.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 73f62966..62e87666 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4897,13 +4897,27 @@ void View::DrawFindZone() ImGui::SameLine(); ImGui::ColorButton( "c3", ImVec4( 0xFF/255.f, 0xAA/255.f, 0x44/255.f, 1.f ), ImGuiColorEditFlags_NoTooltip ); ImGui::SameLine(); - ImGui::Text( "Group average" ); + if( m_findZone.selGroup != m_findZone.Unselected ) + { + ImGui::Text( "Group average" ); + } + else + { + ImGui::TextDisabled( "Group average" ); + } ImGui::SameLine(); ImGui::Spacing(); ImGui::SameLine(); ImGui::ColorButton( "c4", ImVec4( 0x44/255.f, 0xDD/255.f, 0x44/255.f, 1.f ), ImGuiColorEditFlags_NoTooltip ); ImGui::SameLine(); - ImGui::Text( "Group median" ); + if( m_findZone.selGroup != m_findZone.Unselected ) + { + ImGui::Text( "Group median" ); + } + else + { + ImGui::TextDisabled( "Group median" ); + } const auto Height = 200 * ImGui::GetTextLineHeight() / 15.f; const auto wpos = ImGui::GetCursorScreenPos();