mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Proper display of negative time.
This commit is contained in:
parent
b2b3e7d739
commit
4b548156b1
@ -1989,10 +1989,15 @@ bool View::DrawZoneFrames()
|
|||||||
if( tw == 0 )
|
if( tw == 0 )
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
auto txt = TimeToString( m_zvStart - m_frames[0] );
|
const auto t = m_zvStart - m_frames[0];
|
||||||
sprintf( buf, "+%s", txt );
|
auto txt = TimeToString( t );
|
||||||
draw->AddText( wpos + ImVec2( x, round( ty * 0.5 ) ), 0x66FFFFFF, buf );
|
if( t >= 0 )
|
||||||
tw = ImGui::CalcTextSize( buf ).x;
|
{
|
||||||
|
sprintf( buf, "+%s", txt );
|
||||||
|
txt = buf;
|
||||||
|
}
|
||||||
|
draw->AddText( wpos + ImVec2( x, round( ty * 0.5 ) ), 0x66FFFFFF, txt );
|
||||||
|
tw = ImGui::CalcTextSize( txt ).x;
|
||||||
}
|
}
|
||||||
else if( x > tx + tw + ty * 2 )
|
else if( x > tx + tw + ty * 2 )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user