mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 18:09:39 +00:00
Correct odd toggling menu behavior.
This commit is contained in:
parent
088de40365
commit
b8b7568ce5
1 changed files with 12 additions and 3 deletions
|
@ -1146,12 +1146,21 @@ namespace MWInput
|
||||||
bool state = MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame;
|
bool state = MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame;
|
||||||
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
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())
|
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)
|
if(state || mode == MWGui::GM_MainMenu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue