summaryrefslogtreecommitdiff
path: root/src/gui/windows/confirmdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-20 06:11:17 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-20 06:11:17 +0300
commit3363acba6f1e8e51937ae2e354a8086c5c56b8cd (patch)
treecc2429241a3e7cba7a90ba1ae1b76e0abf8e5345 /src/gui/windows/confirmdialog.cpp
parent1f5ca54b8f60e112c2043160700055290c8ce912 (diff)
downloadplus-3363acba6f1e8e51937ae2e354a8086c5c56b8cd.tar.gz
plus-3363acba6f1e8e51937ae2e354a8086c5c56b8cd.tar.bz2
plus-3363acba6f1e8e51937ae2e354a8086c5c56b8cd.tar.xz
plus-3363acba6f1e8e51937ae2e354a8086c5c56b8cd.zip
Show gm revive button in death dialog if player have rights for @alive command.
Diffstat (limited to 'src/gui/windows/confirmdialog.cpp')
-rw-r--r--src/gui/windows/confirmdialog.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp
index a77d3bece..73f23e172 100644
--- a/src/gui/windows/confirmdialog.cpp
+++ b/src/gui/windows/confirmdialog.cpp
@@ -41,6 +41,31 @@ ConfirmDialog::ConfirmDialog(const std::string &restrict title,
Window *const parent) :
Window(title, modal, parent, "confirm.xml"),
ActionListener(),
+ // TRANSLATORS: confirm dialog button
+ mYesMsg(_("Yes")),
+ // TRANSLATORS: confirm dialog button
+ mNoMsg(_("No")),
+ mTextBox(new TextBox(this)),
+ mIgnore(ignore)
+{
+ mTextBox->setEditable(false);
+ mTextBox->setOpaque(Opaque_false);
+ mTextBox->setTextWrapped(msg, 260);
+ soundManager.playGuiSound(soundEvent);
+}
+
+ConfirmDialog::ConfirmDialog(const std::string &restrict title,
+ const std::string &restrict msg,
+ const std::string &restrict yesMsg,
+ const std::string &restrict noMsg,
+ const std::string &restrict soundEvent,
+ const bool ignore,
+ const Modal modal,
+ Window *const parent) :
+ Window(title, modal, parent, "confirm.xml"),
+ ActionListener(),
+ mYesMsg(yesMsg),
+ mNoMsg(noMsg),
mTextBox(new TextBox(this)),
mIgnore(ignore)
{
@@ -54,14 +79,12 @@ void ConfirmDialog::postInit()
{
Window::postInit();
Button *const yesButton = new Button(this,
- // TRANSLATORS: confirm dialog button
- _("Yes"),
+ mYesMsg,
"yes",
BUTTON_SKIN,
this);
Button *const noButton = new Button(this,
- // TRANSLATORS: confirm dialog button
- _("No"),
+ mNoMsg,
"no",
BUTTON_SKIN,
this);