1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-14 13:36:45 +00:00

Merge branch 'minor' into 'master'

Minor code cleanup

See merge request OpenMW/openmw!1038
This commit is contained in:
Petr Mikheev 2021-07-23 11:20:37 +00:00
commit ec79f26320

View file

@ -490,16 +490,17 @@ namespace MWInput
if (MyGUI::InputManager::getInstance ().isModalAny()) if (MyGUI::InputManager::getInstance ().isModalAny())
return; return;
if (MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Journal MWBase::WindowManager* windowManager = MWBase::Environment::get().getWindowManager();
&& MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_MainMenu if (windowManager->getMode() != MWGui::GM_Journal
&& MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Settings && windowManager->getMode() != MWGui::GM_MainMenu
&& MWBase::Environment::get().getWindowManager ()->getJournalAllowed()) && windowManager->getMode() != MWGui::GM_Settings
&& windowManager->getJournalAllowed())
{ {
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Journal); windowManager->pushGuiMode(MWGui::GM_Journal);
} }
else if (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Journal)) else if (windowManager->containsMode(MWGui::GM_Journal))
{ {
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Journal); windowManager->removeGuiMode(MWGui::GM_Journal);
} }
} }