mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +00:00
Add interaction with displayed child nodes.
This commit is contained in:
parent
2c0d4d2817
commit
366da56d99
@ -743,6 +743,7 @@ void View::DrawImpl()
|
|||||||
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-10" PRIu64" Queue delay: %s Timer resolution: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt, TimeToString( m_delay ), TimeToString( m_resolution ) );
|
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-10" PRIu64" Queue delay: %s Timer resolution: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt, TimeToString( m_delay ), TimeToString( m_resolution ) );
|
||||||
DrawFrames();
|
DrawFrames();
|
||||||
DrawZones();
|
DrawZones();
|
||||||
|
m_zoneHighlight = nullptr;
|
||||||
DrawZoneInfoWindow();
|
DrawZoneInfoWindow();
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
@ -1342,6 +1343,18 @@ void View::DrawZoneInfoWindow()
|
|||||||
auto& srcloc = GetSourceLocation( cev.srcloc );
|
auto& srcloc = GetSourceLocation( cev.srcloc );
|
||||||
ImGui::Text( "%s", GetString( srcloc.function ) );
|
ImGui::Text( "%s", GetString( srcloc.function ) );
|
||||||
}
|
}
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
m_zoneHighlight = &cev;
|
||||||
|
if( ImGui::IsMouseClicked( 0 ) )
|
||||||
|
{
|
||||||
|
m_zoneInfoWindow = &cev;
|
||||||
|
}
|
||||||
|
if( ImGui::IsMouseClicked( 2 ) )
|
||||||
|
{
|
||||||
|
ZoomToZone( cev );
|
||||||
|
}
|
||||||
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Text( "%s (%.2f%%)", TimeToString( ctt[cti[i]] ), double( ctt[cti[i]] ) / ztime );
|
ImGui::Text( "%s (%.2f%%)", TimeToString( ctt[cti[i]] ), double( ctt[cti[i]] ) / ztime );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -1360,6 +1373,10 @@ uint32_t View::GetZoneHighlight( const Event& ev )
|
|||||||
{
|
{
|
||||||
return 0xFF44DD44;
|
return 0xFF44DD44;
|
||||||
}
|
}
|
||||||
|
else if( m_zoneHighlight == &ev )
|
||||||
|
{
|
||||||
|
return 0xFF4444FF;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 0xAAAAAAAA;
|
return 0xAAAAAAAA;
|
||||||
|
@ -141,6 +141,7 @@ private:
|
|||||||
double m_timerMul;
|
double m_timerMul;
|
||||||
|
|
||||||
const Event* m_zoneInfoWindow;
|
const Event* m_zoneInfoWindow;
|
||||||
|
const Event* m_zoneHighlight;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user