From 81cf024498ed624940c86e256a302b22e6c29e45 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 5 Oct 2018 20:39:42 +0200 Subject: [PATCH] Highlight message marker even if it's collapsed. --- server/TracyDecayValue.hpp | 1 + server/TracyView.cpp | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/server/TracyDecayValue.hpp b/server/TracyDecayValue.hpp index 746a9b65..bcce09fa 100644 --- a/server/TracyDecayValue.hpp +++ b/server/TracyDecayValue.hpp @@ -17,6 +17,7 @@ public: } tracy_force_inline operator const T& () const { return m_value; } + tracy_force_inline T operator->() const { return m_value; } tracy_force_inline DecayValue& operator=( const T& value ) { diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a5572898..d17b9363 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1594,8 +1594,17 @@ void View::DrawZones() const auto px = ( (*it)->time - m_zvStart ) * pxns; if( dist > 1 ) { - draw->AddTriangleFilled( wpos + ImVec2( px - (ty - to) * 0.5, offset + to ), wpos + ImVec2( px + (ty - to) * 0.5, offset + to ), wpos + ImVec2( px, offset + to + th ), 0xFFDDDDDD ); - draw->AddTriangle( wpos + ImVec2( px - (ty - to) * 0.5, offset + to ), wpos + ImVec2( px + (ty - to) * 0.5, offset + to ), wpos + ImVec2( px, offset + to + th ), 0xFFDDDDDD ); + unsigned int color = 0xFFDDDDDD; + if( m_msgHighlight && m_msgHighlight->thread == v->id ) + { + const auto hTime = m_msgHighlight->time; + if( (*it)->time <= hTime && ( next == v->messages.end() || (*next)->time > hTime ) ) + { + color = 0xFF4444FF; + } + } + draw->AddTriangleFilled( wpos + ImVec2( px - (ty - to) * 0.5, offset + to ), wpos + ImVec2( px + (ty - to) * 0.5, offset + to ), wpos + ImVec2( px, offset + to + th ), color ); + draw->AddTriangle( wpos + ImVec2( px - (ty - to) * 0.5, offset + to ), wpos + ImVec2( px + (ty - to) * 0.5, offset + to ), wpos + ImVec2( px, offset + to + th ), color ); } else {