mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Standard zone list behavior in zone trace.
This commit is contained in:
parent
bf52b3bc98
commit
d6bf19a762
@ -2470,9 +2470,23 @@ void View::DrawZoneInfoWindow()
|
||||
{
|
||||
const auto& srcloc = m_worker.GetSourceLocation( v->srcloc );
|
||||
const auto txt = srcloc.name.active ? m_worker.GetString( srcloc.name ) : m_worker.GetString( srcloc.function );
|
||||
ImGui::Text( "%s", txt );
|
||||
auto sel = ImGui::Selectable( txt, false );
|
||||
auto hover = ImGui::IsItemHovered();
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "%s:%i", m_worker.GetString( srcloc.file ), srcloc.line );
|
||||
if( sel )
|
||||
{
|
||||
m_zoneInfoWindow = v;
|
||||
}
|
||||
if( hover )
|
||||
{
|
||||
m_zoneHighlight = v;
|
||||
if( ImGui::IsMouseClicked( 2 ) )
|
||||
{
|
||||
ZoomToZone( *v );
|
||||
}
|
||||
ZoneTooltip( *v );
|
||||
}
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
@ -2610,9 +2624,23 @@ void View::DrawGpuInfoWindow()
|
||||
{
|
||||
const auto& srcloc = m_worker.GetSourceLocation( v->srcloc );
|
||||
const auto txt = srcloc.name.active ? m_worker.GetString( srcloc.name ) : m_worker.GetString( srcloc.function );
|
||||
ImGui::Text( "%s", txt );
|
||||
auto sel = ImGui::Selectable( txt, false );
|
||||
auto hover = ImGui::IsItemHovered();
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "%s:%i", m_worker.GetString( srcloc.file ), srcloc.line );
|
||||
if( sel )
|
||||
{
|
||||
m_gpuInfoWindow = v;
|
||||
}
|
||||
if( hover )
|
||||
{
|
||||
m_gpuHighlight = v;
|
||||
if( ImGui::IsMouseClicked( 2 ) )
|
||||
{
|
||||
ZoomToZone( *v );
|
||||
}
|
||||
ZoneTooltip( *v );
|
||||
}
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user