From 7684392bd9cbfcfe04a3fdbfff2120864069266d Mon Sep 17 00:00:00 2001 From: nxroot Date: Thu, 22 Oct 2026 14:30:01 +0100 Subject: [PATCH] Mod manager: keep the uninstall confirmation centred whatever its height It is placed by its size every frame: placed only when it appeared, it kept the last confirmation's height, so a short one after the long dependency list sat near the top of the page. Co-Authored-By: Claude Opus 5.5 --- Launcher/gui_mods.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Launcher/gui_mods.cpp b/Launcher/gui_mods.cpp index e0699716..56667ba9 100644 --- a/Launcher/gui_mods.cpp +++ b/Launcher/gui_mods.cpp @@ -1909,6 +1909,9 @@ void mods_window(Launcher& launcher, const Fonts& fonts, ImVec2 size, Ui& ui, Mo if (!panel.confirm_remove.empty() && !ImGui::IsPopupOpen(uninstall)) ImGui::OpenPopup(uninstall); if (!panel.conflict_name.empty() && !ImGui::IsPopupOpen("Replace mod")) ImGui::OpenPopup("Replace mod"); ImGui::SetNextWindowSize(ImVec2(S(460), 0)); + // Centred every frame by its size now: its height changes with the dependencies it lists, and placed + // only when it appears it would keep the last one's (a short confirmation after a long one sat high). + ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Always, ImVec2(0.5f, 0.5f)); if (ImGui::BeginPopupModal(uninstall, nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove)) { const auto chosen = panel.confirm_remove; const auto title = [&](const std::string& name) -> const std::string& {