From 7c52d05f8527b075a07c92fd8e77f9aff81a22f0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 28 Sep 2014 14:00:15 +0200 Subject: [PATCH] Disable topics list visually when in a choice --- apps/openmw/mwgui/dialogue.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index a3f82e65d..196e7d8c7 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -562,12 +562,11 @@ namespace MWGui MyGUI::Button* byeButton; getWidget(byeButton, "ByeButton"); - if(MWBase::Environment::get().getDialogueManager()->isInChoice() && !mGoodbye) { - byeButton->setEnabled(false); - } - else { - byeButton->setEnabled(true); - } + bool goodbyeEnabled = !MWBase::Environment::get().getDialogueManager()->isInChoice() || mGoodbye; + byeButton->setEnabled(goodbyeEnabled); + + bool topicsEnabled = !MWBase::Environment::get().getDialogueManager()->isInChoice() && !mGoodbye; + mTopicsList->setEnabled(topicsEnabled); } void DialogueWindow::notifyLinkClicked (TypesetBook::InteractiveId link) @@ -657,7 +656,6 @@ namespace MWGui { mLinks.push_back(new Goodbye()); mGoodbye = true; - mTopicsList->setEnabled(false); mEnabled = false; updateHistory(); }