From b19d9622b3b6d86da80ccdf835646fee008286a1 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 14 Jan 2026 02:24:02 +0100 Subject: [PATCH] Add small version of DrawWaitingDots(). The normal one is fit for lines with full size buttons, entry fields, etc. --- profiler/src/profiler/TracyImGui.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyImGui.hpp b/profiler/src/profiler/TracyImGui.hpp index e3ffa198..9221202e 100644 --- a/profiler/src/profiler/TracyImGui.hpp +++ b/profiler/src/profiler/TracyImGui.hpp @@ -133,15 +133,16 @@ static constexpr const uint32_t AsmSyntaxColors[] = { draw->AddCircleFilled( wpos + ImVec2( w * 0.5f + ty, h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f - 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); } -[[maybe_unused]] static inline void DrawWaitingDots( double time, bool windowPos = true ) +[[maybe_unused]] static inline void DrawWaitingDots( double time, bool windowPos = true, bool small = false ) { s_wasActive = true; const auto pos = ( windowPos ? ImGui::GetWindowPos() : ImVec2( 0, 0 ) ) + ImGui::GetCursorPos(); auto draw = ImGui::GetWindowDrawList(); const auto ty = ImGui::GetTextLineHeight(); - draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 0 * ty, ty * 0.675f ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f + 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); - draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 1 * ty, ty * 0.675f ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); - draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 2 * ty, ty * 0.675f ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f - 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); + const auto yOffset = ty * ( small ? 0.5f : 0.675f ); + draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 0 * ty, yOffset ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f + 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); + draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 1 * ty, yOffset ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); + draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 2 * ty, yOffset ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f - 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); ImGui::Dummy( ImVec2( ty * 3, ty ) ); }