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:
parent
f2799ea1d9
commit
8b404ee255
3 changed files with 9 additions and 11 deletions
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue