diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-02 16:13:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-03 21:50:05 +0300 |
commit | f651273ebf2a8b11aa01ed1434ecb613177ced6a (patch) | |
tree | c51d2bed1476270e27ad95c5a46e15af32eaccdd /src/gui/dialogsmanager.cpp | |
parent | 30846b7f68f1ad05a0719ae37f75fd2901a6545a (diff) | |
download | mv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.gz mv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.bz2 mv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.xz mv-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.cpp | 23 |
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 |