From a8c219dd88e6893d2eb616e0f565ebc135b56b59 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 29 Sep 2017 19:13:53 +0200 Subject: [PATCH] Display number of collapsed zones. --- server/TracyView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index cd671aa7..200e41f6 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1147,6 +1147,14 @@ int View::DrawZoneLevel( const Vector& vec, bool hover, double pxns, con m_zvEndNext = rend; } } + char tmp[32]; + sprintf( tmp, "%i", num ); + const auto tsz = ImGui::CalcTextSize( tmp ); + if( tsz.x < px1 - px0 ) + { + const auto x = px0 + ( px1 - px0 - tsz.x ) / 2; + draw->AddText( wpos + ImVec2( x, offset ), 0xFF4488DD, tmp ); + } } else {