diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-30 23:53:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-30 23:53:26 +0300 |
commit | 3d70a4744e2294fbcfaedb9a63578ed93fa9d7c5 (patch) | |
tree | b39b8569b98d4bc202efb8d90ff3555a4a8ec5a5 /src | |
parent | f1a357b3ce182b0128f2cf34872f0316107b9750 (diff) | |
download | plus-3d70a4744e2294fbcfaedb9a63578ed93fa9d7c5.tar.gz plus-3d70a4744e2294fbcfaedb9a63578ed93fa9d7c5.tar.bz2 plus-3d70a4744e2294fbcfaedb9a63578ed93fa9d7c5.tar.xz plus-3d70a4744e2294fbcfaedb9a63578ed93fa9d7c5.zip |
Hide death message dialog in reconnect.
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 12 | ||||
-rw-r--r-- | src/game.h | 2 | ||||
-rw-r--r-- | src/gui/quitdialog.cpp | 6 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 2 |
4 files changed, 17 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index a81252b6c..021943822 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -567,7 +567,7 @@ void Game::logic() if (map) map->saveExtraLayer(); } - Client::closeDialogs(); + closeDialogs(); Client::setFramerate(config.getIntValue("fpslimit")); if (logger) { @@ -1875,3 +1875,13 @@ void Game::clearKeysArray() mLastKeys[f].cnt = 0; } } + +void Game::closeDialogs() +{ + Client::closeDialogs(); + if (deathNotice) + { + deathNotice->scheduleDelete(); + deathNotice = 0; + } +} diff --git a/src/game.h b/src/game.h index 84dca08e9..24ca7f0fc 100644 --- a/src/game.h +++ b/src/game.h @@ -96,6 +96,8 @@ class Game void setAdjustLevel(int n) { mAdjustLevel = n; } + static void closeDialogs(); + private: void updateHistory(SDL_Event &event); diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 05691c2d2..1307e198f 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -133,13 +133,13 @@ void QuitDialog::action(const gcn::ActionEvent &event) } else if (mLogoutQuit->isSelected()) { - Client::closeDialogs(); + Game::closeDialogs(); Client::setState(STATE_EXIT); } else if (Net::getGameHandler()->isConnected() && mSwitchAccountServer->isSelected()) { - Client::closeDialogs(); + Game::closeDialogs(); Client::setState(STATE_SWITCH_SERVER); } else if (mSwitchCharacter->isSelected()) @@ -147,7 +147,7 @@ void QuitDialog::action(const gcn::ActionEvent &event) if (Client::getState() == STATE_GAME) { Net::getCharHandler()->switchCharacter(); - Client::closeDialogs(); + Game::closeDialogs(); } } } diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 81e520415..3009426ae 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -74,7 +74,7 @@ namespace Net::getPlayerHandler()->respawn(); deathNotice = NULL; - Client::closeDialogs(); + Game::closeDialogs(); if (viewport) viewport->closePopupMenu(); |