mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-28 16:06:51 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
d11d689d07
commit
7684392bd9
1 file changed
+3
@@ -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& {
|
||||
|
||||
Reference in new issue
Block a user