summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-28 02:14:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-28 03:01:38 +0300
commitc85d939d9b3f6c10288dc86ffa7811408e349657 (patch)
treeb1ca825fde3bad322728df1c9133ec25b74b341e /src/client.cpp
parent5023a1d0b96071a35547dcc309ce45ba6a17eec1 (diff)
downloadmv-c85d939d9b3f6c10288dc86ffa7811408e349657.tar.gz
mv-c85d939d9b3f6c10288dc86ffa7811408e349657.tar.bz2
mv-c85d939d9b3f6c10288dc86ffa7811408e349657.tar.xz
mv-c85d939d9b3f6c10288dc86ffa7811408e349657.zip
Add different sound effects for different events.
Can be configured in audio tab in settings.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 978c58eef..5f79176c7 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1327,14 +1327,16 @@ int Client::gameExec()
case STATE_LOGIN_ERROR:
logger->log1("State: LOGIN ERROR");
- mCurrentDialog = new OkDialog(_("Error"), errorMessage);
+ mCurrentDialog = new OkDialog(_("Error"),
+ errorMessage, DIALOG_ERROR);
mCurrentDialog->addActionListener(&loginListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
break;
case STATE_ACCOUNTCHANGE_ERROR:
logger->log1("State: ACCOUNT CHANGE ERROR");
- mCurrentDialog = new OkDialog(_("Error"), errorMessage);
+ mCurrentDialog = new OkDialog(_("Error"),
+ errorMessage, DIALOG_ERROR);
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
break;
@@ -1370,7 +1372,7 @@ int Client::gameExec()
case STATE_CHANGEPASSWORD_SUCCESS:
logger->log1("State: CHANGE PASSWORD SUCCESS");
mCurrentDialog = new OkDialog(_("Password Change"),
- _("Password changed successfully!"));
+ _("Password changed successfully!"), DIALOG_ERROR);
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
loginData.password = loginData.newPassword;
@@ -1390,7 +1392,7 @@ int Client::gameExec()
case STATE_CHANGEEMAIL_SUCCESS:
logger->log1("State: CHANGE EMAIL SUCCESS");
mCurrentDialog = new OkDialog(_("Email Change"),
- _("Email changed successfully!"));
+ _("Email changed successfully!"), DIALOG_ERROR);
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
break;
@@ -1411,7 +1413,7 @@ int Client::gameExec()
Net::getLoginHandler()->disconnect();
mCurrentDialog = new OkDialog(_("Unregister Successful"),
- _("Farewell, come back any time..."));
+ _("Farewell, come back any time..."), DIALOG_ERROR);
loginData.clear();
//The errorlistener sets the state to STATE_CHOOSE_SERVER
mCurrentDialog->addActionListener(&errorListener);
@@ -1468,7 +1470,8 @@ int Client::gameExec()
case STATE_ERROR:
logger->log1("State: ERROR");
logger->log("Error: %s\n", errorMessage.c_str());
- mCurrentDialog = new OkDialog(_("Error"), errorMessage);
+ mCurrentDialog = new OkDialog(_("Error"),
+ errorMessage, DIALOG_ERROR);
mCurrentDialog->addActionListener(&errorListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
Net::getGameHandler()->disconnect();