summaryrefslogtreecommitdiff
path: root/src/gui/quitdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 22:00:27 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:16 +0300
commitc2a7004213529c403faeb6fdcc374699aa2f53b5 (patch)
treef5701ef3412923bc0e5e033033bd52960d66acc3 /src/gui/quitdialog.cpp
parente8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (diff)
downloadmv-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.gz
mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.bz2
mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.xz
mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.zip
improve getState/setState in Client.
Diffstat (limited to 'src/gui/quitdialog.cpp')
-rw-r--r--src/gui/quitdialog.cpp14
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();