mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
Correct odd toggling menu behavior.
This commit is contained in:
parent
088de40365
commit
b8b7568ce5
@ -1146,12 +1146,21 @@ namespace MWInput
|
||||
bool state = MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame;
|
||||
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
||||
|
||||
if (mode == MWGui::GM_Settings || (!state && mode == MWGui::GM_MainMenu))
|
||||
if (mode == MWGui::GM_MainMenu)
|
||||
{
|
||||
if (MyGUI::InputManager::getInstance().isModalAny())
|
||||
MWBase::Environment::get().getWindowManager()->exitCurrentModal();
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
{
|
||||
while (MyGUI::InputManager::getInstance().isModalAny())
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->exitCurrentModal();
|
||||
}
|
||||
}
|
||||
else if (!state)
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
}
|
||||
else if (mode == MWGui::GM_Settings)
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
|
||||
if(state || mode == MWGui::GM_MainMenu)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user