forked from mirror/openmw-tes3mp
Give access to the main menu when at a choice in dialogue
This commit is contained in:
parent
ee7b5fa5c2
commit
2b3b11d848
2 changed files with 8 additions and 3 deletions
|
@ -698,9 +698,6 @@ namespace MWGui
|
|||
case GM_RestBed:
|
||||
mWaitDialog->exit();
|
||||
break;
|
||||
case GM_Levelup:
|
||||
mLevelupDialog->exit();
|
||||
break;
|
||||
case GM_Name:
|
||||
case GM_Race:
|
||||
case GM_Class:
|
||||
|
|
|
@ -642,6 +642,14 @@ namespace MWInput
|
|||
return;
|
||||
}
|
||||
|
||||
if(MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Dialogue) { //Give access to the main menu when at a choice in Dialogue
|
||||
if(MWBase::Environment::get().getDialogueManager()->isInChoice()) {
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
||||
MWBase::Environment::get().getSoundManager()->pauseSounds (MWBase::SoundManager::Play_TypeSfx);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!MWBase::Environment::get().getWindowManager()->isGuiMode()) //No open GUIs, open up the MainMenu
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
||||
|
|
Loading…
Reference in a new issue