From 0f9597aee888ecf38aa18bab93622e965e9638e8 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 11 Jul 2020 14:05:08 +0200 Subject: [PATCH] Display frame number, if there's space for it. --- server/TracyView.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 370807b8..51823e7a 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2170,6 +2170,13 @@ bool View::DrawZoneFrames( const FrameData& frames ) auto tx = ImGui::CalcTextSize( buf ).x; uint32_t color = ( frames.name == 0 && i == 0 ) ? redColor : activeColor; + if( fsz - 7 <= tx ) + { + static char tmp[256]; + sprintf( tmp, "%i (%s)", i, TimeToString( ftime ) ); + buf = tmp; + tx = ImGui::CalcTextSize( buf ).x; + } if( fsz - 7 <= tx ) { buf = TimeToString( ftime );