mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Add source preview to statistics window.
This commit is contained in:
parent
62ac5544b6
commit
ff6ecef5f3
@ -12492,6 +12492,9 @@ void View::DrawStatistics()
|
||||
const auto file = m_worker.GetString( srcloc.file );
|
||||
|
||||
ImGui::TextDisabled( "%s:%i", file, srcloc.line );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
DrawSourceTooltip( file, srcloc.line );
|
||||
if( ImGui::IsItemClicked( 1 ) )
|
||||
{
|
||||
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this, m_worker ) )
|
||||
@ -12503,6 +12506,7 @@ void View::DrawStatistics()
|
||||
m_statBuzzAnim.Enable( v.srcloc, 0.5f );
|
||||
}
|
||||
}
|
||||
}
|
||||
if( indentVal != 0.f )
|
||||
{
|
||||
ImGui::Unindent( indentVal );
|
||||
@ -12934,6 +12938,9 @@ void View::DrawStatistics()
|
||||
{
|
||||
TextDisabledUnformatted( file );
|
||||
}
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
DrawSourceTooltip( file, line );
|
||||
if( ImGui::IsItemClicked( 1 ) )
|
||||
{
|
||||
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this, m_worker ) )
|
||||
@ -12959,6 +12966,7 @@ void View::DrawStatistics()
|
||||
m_statBuzzAnim.Enable( v.symAddr, 0.5f );
|
||||
}
|
||||
}
|
||||
}
|
||||
if( indentVal != 0.f )
|
||||
{
|
||||
ImGui::Unindent( indentVal );
|
||||
@ -13107,6 +13115,9 @@ void View::DrawStatistics()
|
||||
{
|
||||
TextDisabledUnformatted( file );
|
||||
}
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
DrawSourceTooltip( file, line );
|
||||
if( ImGui::IsItemClicked( 1 ) )
|
||||
{
|
||||
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this, m_worker ) )
|
||||
@ -13132,6 +13143,7 @@ void View::DrawStatistics()
|
||||
m_statBuzzAnim.Enable( iv.symAddr, 0.5f );
|
||||
}
|
||||
}
|
||||
}
|
||||
if( indentVal != 0.f )
|
||||
{
|
||||
ImGui::Unindent( indentVal );
|
||||
|
Loading…
Reference in New Issue
Block a user