summaryrefslogtreecommitdiff
path: root/src/gui/dialogsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-02 16:13:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-03 21:50:05 +0300
commitf651273ebf2a8b11aa01ed1434ecb613177ced6a (patch)
treec51d2bed1476270e27ad95c5a46e15af32eaccdd /src/gui/dialogsmanager.cpp
parent30846b7f68f1ad05a0719ae37f75fd2901a6545a (diff)
downloadmanaverse-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.gz
manaverse-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.bz2
manaverse-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.xz
manaverse-f651273ebf2a8b11aa01ed1434ecb613177ced6a.zip
Add gui mode for dyecmd. Now only basic code added.
Diffstat (limited to 'src/gui/dialogsmanager.cpp')
-rw-r--r--src/gui/dialogsmanager.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp
index 745ef2cc2..69ea6ae11 100644
--- a/src/gui/dialogsmanager.cpp
+++ b/src/gui/dialogsmanager.cpp
@@ -28,14 +28,19 @@
#include "being/playerinfo.h"
#include "gui/widgets/createwidget.h"
-#include "gui/widgets/selldialog.h"
#include "gui/windows/confirmdialog.h"
+
+#ifndef DYECMD
+#include "gui/widgets/selldialog.h"
+
#include "gui/windows/buyselldialog.h"
#include "gui/windows/buydialog.h"
#include "gui/windows/updaterwindow.h"
#include "listeners/playerpostdeathlistener.h"
+#endif
+
#include "listeners/weightlistener.h"
#include "net/inventoryhandler.h"
@@ -55,11 +60,13 @@ DialogsManager *dialogsManager = nullptr;
OkDialog *weightNotice = nullptr;
int weightNoticeTime = 0;
+#ifndef DYECMD
namespace
{
PlayerPostDeathListener postDeathListener;
WeightListener weightListener;
} // namespace
+#endif
DialogsManager::DialogsManager() :
AttributeListener(),
@@ -69,6 +76,7 @@ DialogsManager::DialogsManager() :
void DialogsManager::closeDialogs()
{
+#ifndef DYECMD
NpcDialog::clearDialogs();
BuyDialog::closeAll();
BuySellDialog::closeAll();
@@ -76,6 +84,7 @@ void DialogsManager::closeDialogs()
SellDialog::closeAll();
if (inventoryHandler)
inventoryHandler->destroyStorage();
+#endif
if (deathNotice)
{
deathNotice->scheduleDelete();
@@ -85,11 +94,13 @@ void DialogsManager::closeDialogs()
void DialogsManager::createUpdaterWindow()
{
+#ifndef DYECMD
CREATEWIDGETV(updaterWindow, UpdaterWindow,
settings.updateHost,
settings.oldUpdates,
false,
UpdateType::Normal);
+#endif
}
Window *DialogsManager::openErrorDialog(const std::string &header,
@@ -126,6 +137,7 @@ Window *DialogsManager::openErrorDialog(const std::string &header,
void DialogsManager::playerDeath()
{
+#ifndef DYECMD
if (!deathNotice)
{
// TRANSLATORS: message header
@@ -141,8 +153,10 @@ void DialogsManager::playerDeath()
260);
deathNotice->addActionListener(&postDeathListener);
}
+#endif
}
+#ifndef DYECMD
void DialogsManager::attributeChanged(const AttributesT id,
const int oldVal,
const int newVal)
@@ -197,3 +211,10 @@ void DialogsManager::attributeChanged(const AttributesT id,
}
}
}
+#else
+void DialogsManager::attributeChanged(const AttributesT id A_UNUSED,
+ const int oldVal A_UNUSED,
+ const int newVal A_UNUSED)
+{
+}
+#endif