Clearly indicate that stop operation is in progress.

This commit is contained in:
Bartosz Taudul
2025-06-21 00:14:11 +02:00
parent 7ab657a0d5
commit 998ec7941f

View File

@@ -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