ProgressBar: added indeterminate mode by passing an animated negative value. (#5316, #5370, #1901)

This commit is contained in:
gan74
2024-04-24 19:40:26 +02:00
committed by ocornut
parent b8a44b198c
commit c895e987ad
3 changed files with 39 additions and 12 deletions
+5
View File
@@ -1909,6 +1909,11 @@ static void ShowDemoWindowWidgets()
char buf[32];
sprintf(buf, "%d/%d", (int)(progress_saturated * 1753), 1753);
ImGui::ProgressBar(progress, ImVec2(0.f, 0.f), buf);
ImGui::ProgressBar(-1.0f * (float)ImGui::GetTime(), ImVec2(0.0f, 0.0f), "Searching..");
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);
ImGui::Text("Indeterminate");
ImGui::TreePop();
}