From e72bacbed3ed447701e6619f3383761fa2322caf Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 10 Apr 2022 15:56:49 +0200 Subject: [PATCH] [Client] Prevent main menu from being opened while in TES3MP listboxes --- apps/openmw/mwinput/actionmanager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/openmw/mwinput/actionmanager.cpp b/apps/openmw/mwinput/actionmanager.cpp index 7116d8a0b..e6557a440 100644 --- a/apps/openmw/mwinput/actionmanager.cpp +++ b/apps/openmw/mwinput/actionmanager.cpp @@ -13,6 +13,7 @@ */ #include "../mwmp/Main.hpp" #include "../mwmp/LocalPlayer.hpp" +#include "../mwmp/GUIController.hpp" /* End of tes3mp addition */ @@ -366,6 +367,19 @@ namespace MWInput void ActionManager::toggleMainMenu() { + /* + Start of tes3mp addition + + Don't allow the main menu to be toggled while TES3MP listboxes are open + */ + if (MWBase::Environment::get().getWindowManager()->getMode() == mwmp::GUIController::GM_TES3MP_ListBox) + { + return; + } + /* + End of tes3mp addition + */ + if (MyGUI::InputManager::getInstance().isModalAny()) { MWBase::Environment::get().getWindowManager()->exitCurrentModal();