summaryrefslogtreecommitdiff
path: root/src/gui/okdialog.cpp
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2012-03-01 22:03:01 +0100
committerReid <reidyaro@gmail.com>2012-03-01 22:03:01 +0100
commit490862919d79369112c75955a9c36ff8a081efd3 (patch)
tree6fe89466b9c53ba811f298174e6d787bbae71e09 /src/gui/okdialog.cpp
parentdff814619d63496acd3c4e8730b828b5d4d931fb (diff)
parentd873da3e8e57480016596f714845c1bc7e712e68 (diff)
downloadmanaplus-490862919d79369112c75955a9c36ff8a081efd3.tar.gz
manaplus-490862919d79369112c75955a9c36ff8a081efd3.tar.bz2
manaplus-490862919d79369112c75955a9c36ff8a081efd3.tar.xz
manaplus-490862919d79369112c75955a9c36ff8a081efd3.zip
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/gui/okdialog.cpp')
-rw-r--r--src/gui/okdialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index 4a3bdf731..3259cb6d6 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -22,6 +22,8 @@
#include "gui/okdialog.h"
+#include "sound.h"
+
#include "gui/gui.h"
#include "gui/widgets/button.h"
@@ -34,7 +36,8 @@
#include "debug.h"
OkDialog::OkDialog(const std::string &title, const std::string &msg,
- bool modal, bool showCenter, Window *parent):
+ int soundEvent, bool modal, bool showCenter,
+ Window *parent):
Window(title, modal, parent, "ok.xml")
{
mTextBox = new TextBox;
@@ -71,6 +74,11 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
centerHorisontally();
setVisible(true);
okButton->requestFocus();
+
+ if (soundEvent == DIALOG_OK)
+ sound.playGuiSound(SOUND_INFO);
+ else if (soundEvent == DIALOG_ERROR)
+ sound.playGuiSound(SOUND_ERROR);
}
void OkDialog::action(const gcn::ActionEvent &event)