1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 15:45:34 +00:00

Fix not being able to exit dialogue using Escape when a Goodbye link appears

This commit is contained in:
scrawl 2014-07-13 06:42:24 +02:00
parent f2799ea1d9
commit 8b404ee255
3 changed files with 9 additions and 11 deletions

View file

@ -505,9 +505,10 @@ namespace MWDialogue
void DialogueManager::askQuestion (const std::string& question, int choice)
{
mIsInChoice = true;
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
win->addChoice(question, choice);
mIsInChoice = true;
}
void DialogueManager::goodbye()

View file

@ -273,7 +273,12 @@ namespace MWGui
{
if ((!mEnabled || MWBase::Environment::get().getDialogueManager()->isInChoice())
&& !mGoodbye)
return;
{
// in choice, not allowed to escape, but give access to main menu to allow loading other saves
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
MWBase::Environment::get().getSoundManager()->pauseSounds (MWBase::SoundManager::Play_TypeSfx);
}
else
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
}

View file

@ -686,14 +686,6 @@ 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);