forked from teamnwah/openmw-tes3coop
Just move check if player owns journal to inputmanagerimp.cpp - prevents playing sound when going to main menu.
This commit is contained in:
parent
4eede86ce6
commit
b5caa25e5c
2 changed files with 6 additions and 9 deletions
|
@ -184,11 +184,6 @@ namespace
|
|||
{
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode ();
|
||||
}
|
||||
else
|
||||
{
|
||||
// play opening sound only if the player has the journal
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
|
||||
}
|
||||
mModel->load ();
|
||||
|
||||
setBookMode ();
|
||||
|
@ -218,7 +213,7 @@ namespace
|
|||
|
||||
void close()
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||
|
||||
mModel->unload ();
|
||||
|
||||
getPage (LeftBookPage)->showPage (Book (), 0);
|
||||
|
@ -438,6 +433,7 @@ namespace
|
|||
|
||||
void notifyClose(MyGUI::Widget* _sender)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||
MWBase::Environment::get().getWindowManager ()->popGuiMode ();
|
||||
}
|
||||
|
||||
|
|
|
@ -656,13 +656,14 @@ namespace MWInput
|
|||
// Toggle between game mode and journal mode
|
||||
bool gameMode = !mWindows.isGuiMode();
|
||||
|
||||
if(gameMode)
|
||||
if(gameMode && MWBase::Environment::get().getWindowManager ()->getJournalAllowed())
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
|
||||
mWindows.pushGuiMode(MWGui::GM_Journal);
|
||||
}
|
||||
else if(mWindows.getMode() == MWGui::GM_Journal)
|
||||
{
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||
mWindows.popGuiMode();
|
||||
}
|
||||
// .. but don't touch any other mode.
|
||||
|
|
Loading…
Reference in a new issue