1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-02 17:06:41 +00:00

Merge remote-tracking branch 'rohitnirmal/journal-open-sound'

This commit is contained in:
Marc Zinnschlag 2013-06-13 18:04:38 +02:00
commit df016778be
2 changed files with 6 additions and 6 deletions

View file

@ -213,6 +213,7 @@ namespace
void close() void close()
{ {
mModel->unload (); mModel->unload ();
getPage (LeftBookPage)->showPage (Book (), 0); getPage (LeftBookPage)->showPage (Book (), 0);
@ -433,7 +434,6 @@ namespace
void notifyClose(MyGUI::Widget* _sender) void notifyClose(MyGUI::Widget* _sender)
{ {
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0); MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
MWBase::Environment::get().getWindowManager ()->popGuiMode (); MWBase::Environment::get().getWindowManager ()->popGuiMode ();
} }

View file

@ -666,7 +666,7 @@ namespace MWInput
// Toggle between game mode and journal mode // Toggle between game mode and journal mode
bool gameMode = !mWindows.isGuiMode(); bool gameMode = !mWindows.isGuiMode();
if(gameMode) if(gameMode && 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);
mWindows.pushGuiMode(MWGui::GM_Journal); mWindows.pushGuiMode(MWGui::GM_Journal);