1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-15 00:40:02 +00:00

Allow opening journal during dialogue (Fixes #1460)

This commit is contained in:
scrawl 2014-06-11 03:08:22 +02:00
parent 14a9f0ebf8
commit 0f31e31088

View File

@ -807,8 +807,9 @@ namespace MWInput
if (MyGUI::InputManager::getInstance ().isModalAny()) if (MyGUI::InputManager::getInstance ().isModalAny())
return; return;
// Toggle between game mode and journal mode if((!MWBase::Environment::get().getWindowManager()->isGuiMode()
if(!MWBase::Environment::get().getWindowManager()->isGuiMode() && MWBase::Environment::get().getWindowManager ()->getJournalAllowed()) || MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Dialogue)
&& MWBase::Environment::get().getWindowManager ()->getJournalAllowed())
{ {
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0); MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Journal); MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Journal);
@ -817,7 +818,6 @@ namespace MWInput
{ {
MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode(); MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode();
} }
// .. but don't touch any other mode.
} }
void InputManager::quickKey (int index) void InputManager::quickKey (int index)