From c85d939d9b3f6c10288dc86ffa7811408e349657 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Feb 2012 02:14:15 +0300 Subject: Add different sound effects for different events. Can be configured in audio tab in settings. --- src/client.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/client.cpp') 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(); -- cgit v1.2.3-60-g2f50