diff options
-rw-r--r-- | src/gui/charcreatedialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/okdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/okdialog.h | 2 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 2 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index cd7949ed..3d240271 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -175,7 +175,7 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) { new OkDialog(_("Error"), _("Your name needs to be at least 4 characters."), - this); + true, this); } } else if (event.getId() == "cancel") diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp index 3693f3e9..71b96374 100644 --- a/src/gui/okdialog.cpp +++ b/src/gui/okdialog.cpp @@ -31,8 +31,8 @@ #include <guichan/font.hpp> OkDialog::OkDialog(const std::string &title, const std::string &msg, - Window *parent): - Window(title, true, parent) + bool modal, Window *parent): + Window(title, modal, parent) { mTextBox = new TextBox; mTextBox->setEditable(false); diff --git a/src/gui/okdialog.h b/src/gui/okdialog.h index 1e0557b7..3c842309 100644 --- a/src/gui/okdialog.h +++ b/src/gui/okdialog.h @@ -42,7 +42,7 @@ class OkDialog : public Window, public gcn::ActionListener * @see Window::Window */ OkDialog(const std::string &title, const std::string &msg, - Window *parent = NULL); + bool modal = true, Window *parent = NULL); /** * Called when receiving actions from the widgets. diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 33a6b146..7fb4dab9 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -310,7 +310,8 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) if (player_node->getHp() == 0 && !deathNotice) { deathNotice = new OkDialog(_("Message"), - randomDeathMessage()); + randomDeathMessage(), + false); deathNotice->addActionListener(&deathListener); player_node->setAction(Being::DEAD); } diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 99b01090..5f9d1586 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -323,7 +323,7 @@ void BeingHandler::handleBeingActionChangeMessage(Net::MessageIn &msg) }; std::string message(deadMsg[rand()%13]); message.append(std::string(" ") + _("Press OK to respawn.")); - OkDialog *dlg = new OkDialog(_("You Died"), message); + OkDialog *dlg = new OkDialog(_("You Died"), message, false); dlg->addActionListener(&(ManaServ::respawnListener)); } } |