diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7d2e9610..2f7b8af1 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -674,9 +674,9 @@ bool View::DrawImpl() if( m_showInfo ) DrawInfo(); if( m_textEditorFile ) DrawTextEditor(); + const auto& io = ImGui::GetIO(); if( m_zoomAnim.active ) { - const auto& io = ImGui::GetIO(); m_zoomAnim.progress += io.DeltaTime * m_zoomAnim.lenMod; if( m_zoomAnim.progress >= 1.f ) { @@ -692,6 +692,8 @@ bool View::DrawImpl() } } + m_callstackBuzzAnim.Update( io.DeltaTime ); + return keepOpen; } @@ -5749,6 +5751,13 @@ void View::DrawCallstackWindow() } ImGui::NextColumn(); ImGui::PushTextWrapPos( 0.0f ); + float indentVal = 0.f; + if( m_callstackBuzzAnim.Match( fidx ) ) + { + const auto time = m_callstackBuzzAnim.Time(); + indentVal = sin( time * 60.f ) * 10.f * time; + ImGui::Indent( indentVal ); + } txt = m_worker.GetString( frame->file ); if( frame->line == 0 ) { @@ -5768,6 +5777,14 @@ void View::DrawCallstackWindow() { SetTextEditorFile( txt, frame->line ); } + else + { + m_callstackBuzzAnim.Enable( fidx, 0.5f ); + } + } + if( indentVal != 0.f ) + { + ImGui::Unindent( indentVal ); } ImGui::PopTextWrapPos(); ImGui::NextColumn(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index a4287607..e366c9e4 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -9,6 +9,7 @@ #include #include +#include "TracyBuzzAnim.hpp" #include "TracyDecayValue.hpp" #include "TracyVector.hpp" #include "TracyWorker.hpp" @@ -236,6 +237,7 @@ private: Namespace m_namespace; Animation m_zoomAnim; + BuzzAnim m_callstackBuzzAnim; Vector m_zoneInfoStack; Vector m_gpuInfoStack;