mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Left click on message marker displays it on the msg list.
This commit is contained in:
@@ -228,6 +228,7 @@ View::View( const char* addr )
|
||||
, m_zoneSrcLocHighlight( 0 )
|
||||
, m_lockHighlight { -1 }
|
||||
, m_msgHighlight( nullptr )
|
||||
, m_msgToFocus( nullptr )
|
||||
, m_gpuInfoWindow( nullptr )
|
||||
, m_callstackInfoWindow( 0 )
|
||||
, m_memoryAllocInfoWindow( -1 )
|
||||
@@ -269,6 +270,7 @@ View::View( FileRead& f )
|
||||
, m_zoneInfoWindow( nullptr )
|
||||
, m_zoneSrcLocHighlight( 0 )
|
||||
, m_msgHighlight( nullptr )
|
||||
, m_msgToFocus( nullptr )
|
||||
, m_gpuInfoWindow( nullptr )
|
||||
, m_callstackInfoWindow( 0 )
|
||||
, m_memoryAllocInfoWindow( -1 )
|
||||
@@ -1378,6 +1380,11 @@ void View::DrawZones()
|
||||
ImGui::EndTooltip();
|
||||
m_msgHighlight = *it;
|
||||
|
||||
if( ImGui::IsMouseClicked( 0 ) )
|
||||
{
|
||||
m_showMessages = true;
|
||||
m_msgToFocus = *it;
|
||||
}
|
||||
if( ImGui::IsMouseClicked( 2 ) )
|
||||
{
|
||||
CenterAtTime( (*it)->time );
|
||||
@@ -3936,6 +3943,11 @@ void View::DrawMessages()
|
||||
{
|
||||
m_msgHighlight = v;
|
||||
}
|
||||
if( m_msgToFocus == v )
|
||||
{
|
||||
ImGui::SetScrollHere();
|
||||
m_msgToFocus = nullptr;
|
||||
}
|
||||
ImGui::PopID();
|
||||
ImGui::NextColumn();
|
||||
ImGui::Text( "%s", m_worker.GetThreadString( v->thread ) );
|
||||
|
||||
Reference in New Issue
Block a user