From 7ad9cafefb4ca710b70a0ca014a88ba0cd9ce0f9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 19 Jun 2021 17:41:29 +0200 Subject: [PATCH] Add child call samples hints to the UI. --- server/TracySourceView.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index b3355e8c..9095c77e 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -1265,6 +1265,12 @@ void SourceView::RenderSymbolView( Worker& worker, View& view ) { ImGui::SameLine(); ImGui::TextDisabled( "(%c%s)", m_childCalls ? '-' : '+', TimeToString( iptotalAsm.ext * worker.GetSamplingPeriod() ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( "Child call samples" ); + ImGui::EndTooltip(); + } } ImGui::SameLine(); ImGui::Spacing(); @@ -1281,6 +1287,12 @@ void SourceView::RenderSymbolView( Worker& worker, View& view ) { ImGui::SameLine(); ImGui::Text( "(%c%s)", m_childCalls ? '-' : '+', RealToString( iptotalAsm.ext ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( "Child call samples" ); + ImGui::EndTooltip(); + } } ImGui::SameLine(); ImGui::Spacing();