From a98bbc2340fc5a720860528b2cf4144b25d4e82e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 24 Jul 2022 01:12:42 +0200 Subject: [PATCH] Display plot color in plot tooltip. --- server/TracyView_Plots.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/TracyView_Plots.cpp b/server/TracyView_Plots.cpp index d21aec1d..d18ec54c 100644 --- a/server/TracyView_Plots.cpp +++ b/server/TracyView_Plots.cpp @@ -119,7 +119,9 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, offset ), wpos + ImVec2( ty + txtx, offset + ty ) ) ) { ImGui::BeginTooltip(); - ImGui::Text( "Plot \"%s\"", txt ); + SmallColorBox( GetPlotColor( v ) ); + ImGui::SameLine(); + TextFocused( "Plot", txt ); ImGui::Separator(); const auto first = v->data.front().time.Val();