summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2009-10-01 19:56:50 +0300
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-13 11:54:05 +0100
commit0cf7a6a12f361faf7a2a1c01b14d6c33fe811d62 (patch)
tree557546557020fefd36525c58cbec0f640bdd4893
parentc57aeeaf880a416c1c25b2e2684a571fdb17f6c4 (diff)
downloadmana-client-0cf7a6a12f361faf7a2a1c01b14d6c33fe811d62.tar.gz
mana-client-0cf7a6a12f361faf7a2a1c01b14d6c33fe811d62.tar.bz2
mana-client-0cf7a6a12f361faf7a2a1c01b14d6c33fe811d62.tar.xz
mana-client-0cf7a6a12f361faf7a2a1c01b14d6c33fe811d62.zip
Allow player to talk after death
Mantis-issue: 938 (TMW Mantis)
-rw-r--r--src/gui/charcreatedialog.cpp2
-rw-r--r--src/gui/okdialog.cpp4
-rw-r--r--src/gui/okdialog.h2
-rw-r--r--src/net/ea/playerhandler.cpp3
-rw-r--r--src/net/manaserv/beinghandler.cpp2
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));
}
}