From 51135c1d20f6370505243b74ab866d397072cd98 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 19 Jun 2019 20:01:41 +0200 Subject: [PATCH] Pulse hover-info line on histograms. --- server/TracyView.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 5b93adbf..d8677b82 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6573,7 +6573,9 @@ void View::DrawFindZone() { zonePos = round( ( zoneTime - tmin ) / float( tmax - tmin ) * numBins ); } - draw->AddLine( ImVec2( wpos.x + zonePos, wpos.y ), ImVec2( wpos.x + zonePos, wpos.y+Height-2 ), 0xFFFFFFFF ); + const auto c = uint32_t( ( sin( s_time * 10 ) * 0.25 + 0.75 ) * 255 ); + const auto color = 0xFF000000 | ( c << 16 ) | ( c << 8 ) | c; + draw->AddLine( ImVec2( wpos.x + zonePos, wpos.y ), ImVec2( wpos.x + zonePos, wpos.y+Height-2 ), color ); } } } @@ -8737,7 +8739,9 @@ void View::DrawInfo() { framePos = round( ( frameTime - tmin ) / float( tmax - tmin ) * numBins ); } - draw->AddLine( ImVec2( wpos.x + framePos, wpos.y ), ImVec2( wpos.x + framePos, wpos.y+Height-2 ), 0xFFFFFFFF ); + const auto c = uint32_t( ( sin( s_time * 10 ) * 0.25 + 0.75 ) * 255 ); + const auto color = 0xFF000000 | ( c << 16 ) | ( c << 8 ) | c; + draw->AddLine( ImVec2( wpos.x + framePos, wpos.y ), ImVec2( wpos.x + framePos, wpos.y+Height-2 ), color ); } } }