summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-14 16:13:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-14 16:13:21 +0300
commit9dc34ffd9866b3783d8e93f5594bab6bd5b4efc0 (patch)
tree7f66120855d16c6599c997a41a6fbf0bfee95361 /src/gamemodifiers.cpp
parent812193ffc15ce42487b92c6c2294475bfcf0b5d9 (diff)
downloadmanaverse-9dc34ffd9866b3783d8e93f5594bab6bd5b4efc0.tar.gz
manaverse-9dc34ffd9866b3783d8e93f5594bab6bd5b4efc0.tar.bz2
manaverse-9dc34ffd9866b3783d8e93f5594bab6bd5b4efc0.tar.xz
manaverse-9dc34ffd9866b3783d8e93f5594bab6bd5b4efc0.zip
Use CREATEWIDGET2 in gamemodifiers.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r--src/gamemodifiers.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 8c2f71e50..d4880e9f2 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -33,6 +33,8 @@
#include "gui/windows/okdialog.h"
#include "gui/windows/outfitwindow.h"
+#include "gui/widgets/createwidget.h"
+
#include "gui/widgets/tabs/chat/chattab.h"
#include "listeners/gamemodifierlistener.h"
@@ -430,8 +432,9 @@ void GameModifiers::changeAwayMode(const bool forward A_UNUSED)
localPlayer->navigateClean();
if (outfitWindow)
outfitWindow->wearAwayOutfit();
- // TRANSLATORS: away message box header
- OkDialog *const dialog = new OkDialog(_("Away"),
+ OkDialog *const dialog = CREATEWIDGET2(OkDialog,
+ // TRANSLATORS: away message box header
+ _("Away"),
config.getStringValue("afkMessage"),
// TRANSLATORS: ok dialog button
_("OK"),
@@ -440,7 +443,6 @@ void GameModifiers::changeAwayMode(const bool forward A_UNUSED)
ShowCenter_false,
nullptr,
260);
- dialog->postInit();
localPlayer->setAwayDialog(dialog);
dialog->addActionListener(localPlayer->getAwayListener());
soundManager.volumeOff();