summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-20 14:32:06 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-20 14:32:06 +0000
commit0f730185d2e73bf80b6a53952c626a7b22ab5055 (patch)
treecacbe04bb3855ade0d3fa9c30302036e1be9a7ec /src/game.cpp
parentaa786b1b7898c9a4cd47135fabd3b1558b6d71c5 (diff)
downloadmana-client-0f730185d2e73bf80b6a53952c626a7b22ab5055.tar.gz
mana-client-0f730185d2e73bf80b6a53952c626a7b22ab5055.tar.bz2
mana-client-0f730185d2e73bf80b6a53952c626a7b22ab5055.tar.xz
mana-client-0f730185d2e73bf80b6a53952c626a7b22ab5055.zip
Fixed use of Enter for closing death and weight notices, and changed glColor4f
to glColor4ub.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 0748d65b..164eab55 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -124,11 +124,11 @@ const int MAX_TIME = 10000;
class WeightNoticeListener : public gcn::ActionListener
{
-public:
- void action(const std::string &eventId)
- {
- weightNotice = NULL;
- }
+ public:
+ void action(const std::string &eventId)
+ {
+ weightNotice = NULL;
+ }
} weightNoticeListener;
@@ -509,7 +509,10 @@ void do_input()
// Input chat window
case SDLK_RETURN:
- if (chatWindow->isFocused()) {
+ if (chatWindow->isFocused() ||
+ deathNotice != NULL ||
+ weightNotice != NULL)
+ {
break;
}
@@ -518,15 +521,6 @@ void do_input()
{
state = EXIT;
}
- // Accept the Death Notice...
- else if (deathNotice)
- {
- deathNotice->action("ok");
- }
- else if (weightNotice)
- {
- weightNotice->action("ok");
- }
// Close the Browser if opened
else if (helpWindow->isVisible())
{
@@ -1583,7 +1577,6 @@ void do_parse()
deathNotice = new OkDialog("Message",
"You're now dead, press ok to restart",
&deathNoticeListener);
- deathNotice->releaseModalFocus();
player_node->action = Being::DEAD;
}
}