mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Message highlighting.
This commit is contained in:
parent
bf8f369e33
commit
ad95813ba0
@ -1625,6 +1625,8 @@ bool View::DrawZoneFrames()
|
|||||||
|
|
||||||
void View::DrawZones()
|
void View::DrawZones()
|
||||||
{
|
{
|
||||||
|
m_msgHighlight = nullptr;
|
||||||
|
|
||||||
if( m_zvStart == m_zvEnd ) return;
|
if( m_zvStart == m_zvEnd ) return;
|
||||||
assert( m_zvStart < m_zvEnd );
|
assert( m_zvStart < m_zvEnd );
|
||||||
|
|
||||||
@ -1684,6 +1686,7 @@ void View::DrawZones()
|
|||||||
ImGui::Text( "%s", TimeToString( (*it)->time - m_frames[0] ) );
|
ImGui::Text( "%s", TimeToString( (*it)->time - m_frames[0] ) );
|
||||||
ImGui::Text( "%s", (*it)->txt );
|
ImGui::Text( "%s", (*it)->txt );
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
|
m_msgHighlight = *it;
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
@ -2507,7 +2510,14 @@ void View::DrawMessages()
|
|||||||
{
|
{
|
||||||
char tmp[4096];
|
char tmp[4096];
|
||||||
sprintf( tmp, "%10s | %s", TimeToString( v->time - m_frames[0] ), v->txt );
|
sprintf( tmp, "%10s | %s", TimeToString( v->time - m_frames[0] ), v->txt );
|
||||||
ImGui::Text( tmp );
|
if( m_msgHighlight == v )
|
||||||
|
{
|
||||||
|
ImGui::TextColored( ImVec4( 0xDD / 255.f, 0x22 / 255.f, 0x22 / 255.f, 1.f ), "%s", tmp );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::Text( "%s", tmp );
|
||||||
|
}
|
||||||
if( ImGui::IsItemClicked() )
|
if( ImGui::IsItemClicked() )
|
||||||
{
|
{
|
||||||
m_pause = true;
|
m_pause = true;
|
||||||
|
@ -236,6 +236,7 @@ private:
|
|||||||
const Event* m_zoneInfoWindow;
|
const Event* m_zoneInfoWindow;
|
||||||
const Event* m_zoneHighlight;
|
const Event* m_zoneHighlight;
|
||||||
LockHighlight m_lockHighlight;
|
LockHighlight m_lockHighlight;
|
||||||
|
const MessageData* m_msgHighlight;
|
||||||
|
|
||||||
bool m_showOptions;
|
bool m_showOptions;
|
||||||
bool m_showMessages;
|
bool m_showMessages;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user