mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00: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