Give access to the main menu when at a choice in dialogue

deque
Digmaster 11 years ago
parent ee7b5fa5c2
commit 2b3b11d848

@ -698,9 +698,6 @@ namespace MWGui
case GM_RestBed: case GM_RestBed:
mWaitDialog->exit(); mWaitDialog->exit();
break; break;
case GM_Levelup:
mLevelupDialog->exit();
break;
case GM_Name: case GM_Name:
case GM_Race: case GM_Race:
case GM_Class: case GM_Class:

@ -642,6 +642,14 @@ namespace MWInput
return; 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 if(!MWBase::Environment::get().getWindowManager()->isGuiMode()) //No open GUIs, open up the MainMenu
{ {
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu); MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);

Loading…
Cancel
Save