From 299a1f32ed59855c3be4305d1336799efaca3ec2 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Wed, 26 Dec 2012 23:52:16 +0000 Subject: [PATCH] cleanup --- apps/openmw/mwgui/windowmanagerimp.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index ebef71409..fe3cb7b11 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -537,20 +537,19 @@ void WindowManager::removeDialog(OEngine::GUI::Layout*dialog) void WindowManager::messageBox (const std::string& message, const std::vector& buttons) { - /* If there are no buttons, and there is a dialogue window open, messagebox goes to the dialogue window */ - if(buttons.empty() && std::find(mGuiModes.begin(), mGuiModes.end(), GM_Dialogue) != mGuiModes.end()) - mDialogueWindow->addMessageBox(MyGUI::LanguageManager::getInstance().replaceTags(message)); + if(buttons.empty()){ + /* If there are no buttons, and there is a dialogue window open, messagebox goes to the dialogue window */ + if(std::find(mGuiModes.begin(), mGuiModes.end(), GM_Dialogue) != mGuiModes.end()) + mDialogueWindow->addMessageBox(MyGUI::LanguageManager::getInstance().replaceTags(message)); - else{ - if (buttons.empty()) - { - mMessageBoxManager->createMessageBox(message); - } else - { - mMessageBoxManager->createInteractiveMessageBox(message, buttons); - pushGuiMode(GM_InterMessageBox); - } + mMessageBoxManager->createMessageBox(message); + } + + else + { + mMessageBoxManager->createInteractiveMessageBox(message, buttons); + pushGuiMode(GM_InterMessageBox); } }