1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 20:45:32 +00:00

Loosen mode restrictions on opening Journal window (Fixes #1570)

This commit is contained in:
scrawl 2014-08-01 19:40:17 +02:00
parent cd8287da16
commit ef78ae22f6

View file

@ -805,16 +805,16 @@ namespace MWInput
if (MyGUI::InputManager::getInstance ().isModalAny())
return;
if((!MWBase::Environment::get().getWindowManager()->isGuiMode()
|| MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Dialogue)
&& MWBase::Environment::get().getWindowManager ()->getJournalAllowed())
if(MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Journal
&& MWBase::Environment::get().getWindowManager ()->getJournalAllowed()
&& MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Console)
{
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Journal);
}
else if(MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Journal)
else if(MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Journal))
{
MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode();
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Journal);
}
}