// A full-viewport overlay shown while app_exit_shutdown_start is running shutdown in the // background (exit_shutdown.jai), so the window stays live and visibly busy instead of looking // hung while the app finishes saving, with what it is waiting on. app_exit_shutdown_overlay_ui :: () { using ImGui; if !app_exit_shutdown_started() return; text, elapsed, detail := app_exit_shutdown_status(); seconds := FormatFloat.{value = elapsed, trailing_width = 1, zero_removal = .NO}; label := tprint("%1 (%2 s)", text, seconds); if detail label = tprint("%\n%", label, detail); // what it is waiting on viewport := GetMainViewport(); draw_list := GetForegroundDrawList(viewport); draw_list.AddRectFilled(draw_list, viewport.Pos, viewport.Pos + viewport.Size, GetColorU32(.{0, 0, 0, 0.55})); padding := Vector2.{imgui_scale(18.0), imgui_scale(12.0)}; text_size := imgui_text_size(label); box_size := text_size + 2 * padding; box_min := Vector2.{ viewport.Pos.x + (viewport.Size.x - box_size.x) * 0.5, viewport.Pos.y + (viewport.Size.y - box_size.y) * 0.5, }; box_max := box_min + box_size; background := GetStyleColorVec4(.PopupBg).*; border := app_theme.palette.accent; text_color := GetStyleColorVec4(.Text).*; rounding := GetStyle().WindowRounding; draw_list.AddRectFilled(draw_list, box_min, box_max, GetColorU32(background), rounding); draw_list.AddRect(draw_list, box_min, box_max, GetColorU32(border), rounding, imgui_scale(1.5)); draw_list.AddText(draw_list, box_min + padding, GetColorU32(text_color), label); }