From 998ec7941fc6a84ad9a40cfd49ab7d7c6aaea434 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 21 Jun 2025 00:14:11 +0200 Subject: [PATCH] Clearly indicate that stop operation is in progress. --- profiler/src/profiler/TracyLlm.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 0d0e28b7..19d8469d 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -490,7 +490,10 @@ void TracyLlm::Draw() if( m_responding ) { + const bool disabled = m_stop; + if( disabled ) ImGui::BeginDisabled(); if( ImGui::Button( ICON_FA_STOP " Stop" ) ) m_stop = true; + if( disabled ) ImGui::EndDisabled(); ImGui::SameLine(); const auto pos = ImGui::GetWindowPos() + ImGui::GetCursorPos(); auto draw = ImGui::GetWindowDrawList(); @@ -500,7 +503,14 @@ void TracyLlm::Draw() draw->AddCircleFilled( pos + ImVec2( ty * 0.5f + 2 * ty, ty * 0.675f ), ty * ( 0.15f + 0.2f * ( pow( cos( s_time * 3.5f - 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 ); ImGui::Dummy( ImVec2( ty * 3, ty ) ); ImGui::SameLine(); - ImGui::TextUnformatted( "Generating..." ); + if( m_stop ) + { + ImGui::TextUnformatted( "Stopping..." ); + } + else + { + ImGui::TextUnformatted( "Generating..." ); + } s_wasActive = true; } else