forked from teamnwah/openmw-tes3coop
Moved journal open/close sound effect playback to JournalWindowImpl, and have opening sound play only if the player has the journal.
This commit is contained in:
parent
48496a644f
commit
4eede86ce6
2 changed files with 8 additions and 5 deletions
|
@ -184,6 +184,11 @@ 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 ();
|
||||
|
@ -213,6 +218,7 @@ namespace
|
|||
|
||||
void close()
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||
mModel->unload ();
|
||||
|
||||
getPage (LeftBookPage)->showPage (Book (), 0);
|
||||
|
@ -432,8 +438,6 @@ namespace
|
|||
|
||||
void notifyClose(MyGUI::Widget* _sender)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||
|
||||
MWBase::Environment::get().getWindowManager ()->popGuiMode ();
|
||||
}
|
||||
|
||||
|
|
|
@ -658,12 +658,11 @@ namespace MWInput
|
|||
|
||||
if(gameMode)
|
||||
{
|
||||
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