diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 22:00:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | c2a7004213529c403faeb6fdcc374699aa2f53b5 (patch) | |
tree | f5701ef3412923bc0e5e033033bd52960d66acc3 /src/gui/quitdialog.cpp | |
parent | e8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (diff) | |
download | plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.gz plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.bz2 plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.xz plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.zip |
improve getState/setState in Client.
Diffstat (limited to 'src/gui/quitdialog.cpp')
-rw-r--r-- | src/gui/quitdialog.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index cfdfb03c2..894d4ff24 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -77,7 +77,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe): addKeyListener(this); ContainerPlacer placer = getPlacer(0, 0); - const State state = Client::getState(); + const State state = client->getState(); mNeedForceQuit = (state == STATE_CHOOSE_SERVER || state == STATE_CONNECT_SERVER || state == STATE_LOGIN || state == STATE_PRE_LOGIN || state == STATE_LOGIN_ATTEMPT @@ -162,12 +162,12 @@ void QuitDialog::action(const gcn::ActionEvent &event) if (mForceQuit->isSelected()) { - Client::setState(STATE_FORCE_QUIT); + client->setState(STATE_FORCE_QUIT); } else if (mLogoutQuit->isSelected()) { Game::closeDialogs(); - Client::setState(STATE_EXIT); + client->setState(STATE_EXIT); } else if (mRate && mRate->isSelected()) { @@ -176,23 +176,23 @@ void QuitDialog::action(const gcn::ActionEvent &event) config.setValue("rated", true); if (mNeedForceQuit) { - Client::setState(STATE_FORCE_QUIT); + client->setState(STATE_FORCE_QUIT); } else { Game::closeDialogs(); - Client::setState(STATE_EXIT); + client->setState(STATE_EXIT); } } else if (Net::getGameHandler()->isConnected() && mSwitchAccountServer->isSelected()) { Game::closeDialogs(); - Client::setState(STATE_SWITCH_SERVER); + client->setState(STATE_SWITCH_SERVER); } else if (mSwitchCharacter->isSelected()) { - if (Client::getState() == STATE_GAME) + if (client->getState() == STATE_GAME) { Net::getCharServerHandler()->switchCharacter(); Game::closeDialogs(); |