Message highlighting.

This commit is contained in:
Bartosz Taudul 2017-10-14 15:47:06 +02:00
parent bf8f369e33
commit ad95813ba0
2 changed files with 12 additions and 1 deletions

View File

@ -1625,6 +1625,8 @@ bool View::DrawZoneFrames()
void View::DrawZones()
{
m_msgHighlight = nullptr;
if( m_zvStart == m_zvEnd ) return;
assert( m_zvStart < m_zvEnd );
@ -1684,6 +1686,7 @@ void View::DrawZones()
ImGui::Text( "%s", TimeToString( (*it)->time - m_frames[0] ) );
ImGui::Text( "%s", (*it)->txt );
ImGui::EndTooltip();
m_msgHighlight = *it;
}
++it;
}
@ -2507,7 +2510,14 @@ void View::DrawMessages()
{
char tmp[4096];
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() )
{
m_pause = true;

View File

@ -236,6 +236,7 @@ private:
const Event* m_zoneInfoWindow;
const Event* m_zoneHighlight;
LockHighlight m_lockHighlight;
const MessageData* m_msgHighlight;
bool m_showOptions;
bool m_showMessages;