actorid
Tom Mason 12 years ago
parent 51fce62b69
commit 299a1f32ed

@ -537,20 +537,19 @@ void WindowManager::removeDialog(OEngine::GUI::Layout*dialog)
void WindowManager::messageBox (const std::string& message, const std::vector<std::string>& 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);
}
}

Loading…
Cancel
Save