1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-18 10:36:45 +00:00
This commit is contained in:
Tom Mason 2012-12-26 23:52:16 +00:00
parent 51fce62b69
commit 299a1f32ed

View file

@ -537,22 +537,21 @@ void WindowManager::removeDialog(OEngine::GUI::Layout*dialog)
void WindowManager::messageBox (const std::string& message, const std::vector<std::string>& buttons) void WindowManager::messageBox (const std::string& message, const std::vector<std::string>& buttons)
{ {
if(buttons.empty()){
/* If there are no buttons, and there is a dialogue window open, messagebox goes to the dialogue window */ /* 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()) if(std::find(mGuiModes.begin(), mGuiModes.end(), GM_Dialogue) != mGuiModes.end())
mDialogueWindow->addMessageBox(MyGUI::LanguageManager::getInstance().replaceTags(message)); mDialogueWindow->addMessageBox(MyGUI::LanguageManager::getInstance().replaceTags(message));
else{ else
if (buttons.empty())
{
mMessageBoxManager->createMessageBox(message); mMessageBoxManager->createMessageBox(message);
} }
else else
{ {
mMessageBoxManager->createInteractiveMessageBox(message, buttons); mMessageBoxManager->createInteractiveMessageBox(message, buttons);
pushGuiMode(GM_InterMessageBox); pushGuiMode(GM_InterMessageBox);
} }
} }
}
int WindowManager::readPressedButton () int WindowManager::readPressedButton ()
{ {