1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

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

This commit is contained in:
gan74 2024-04-24 19:32:36 +02:00 committed by ocornut
parent b8a44b198c
commit c895e987ad
3 changed files with 39 additions and 12 deletions

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();
}