mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Display frame number, if there's space for it.
This commit is contained in:
parent
0977952bde
commit
0f9597aee8
@ -2170,6 +2170,13 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
|||||||
auto tx = ImGui::CalcTextSize( buf ).x;
|
auto tx = ImGui::CalcTextSize( buf ).x;
|
||||||
uint32_t color = ( frames.name == 0 && i == 0 ) ? redColor : activeColor;
|
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 )
|
if( fsz - 7 <= tx )
|
||||||
{
|
{
|
||||||
buf = TimeToString( ftime );
|
buf = TimeToString( ftime );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user