summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-05 21:49:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-06 12:12:22 +0300
commit2bd59adc7c456ce6f377feac8bc838e8011ebfc8 (patch)
treef2f25428e42e59b9a6d55d7c0be9a99c42e96e40 /src/gui/windows
parentac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff)
downloadmanaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz
manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2
manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz
manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip
Fix code style.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.h1
-rw-r--r--src/gui/windows/buyingstoreselldialog.cpp1
-rw-r--r--src/gui/windows/buyselldialog.h1
-rw-r--r--src/gui/windows/changeemaildialog.cpp4
-rw-r--r--src/gui/windows/changepassworddialog.cpp4
-rw-r--r--src/gui/windows/charcreatedialog.cpp4
-rw-r--r--src/gui/windows/charselectdialog.cpp6
-rw-r--r--src/gui/windows/chatwindow.cpp4
-rw-r--r--src/gui/windows/chatwindow.h1
-rw-r--r--src/gui/windows/didyouknowwindow.h2
-rw-r--r--src/gui/windows/editserverdialog.cpp4
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp9
-rw-r--r--src/gui/windows/inventorywindow.h2
-rw-r--r--src/gui/windows/killstats.cpp2
-rw-r--r--src/gui/windows/logindialog.cpp2
-rw-r--r--src/gui/windows/mailwindow.cpp2
-rw-r--r--src/gui/windows/minimap.cpp1
-rw-r--r--src/gui/windows/ministatuswindow.cpp20
-rw-r--r--src/gui/windows/ministatuswindow.h2
-rw-r--r--src/gui/windows/npcdialog.cpp4
-rw-r--r--src/gui/windows/npcdialog.h1
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/quitdialog.cpp2
-rw-r--r--src/gui/windows/registerdialog.cpp4
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/setupwindow.h2
-rw-r--r--src/gui/windows/shopselldialog.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp4
-rw-r--r--src/gui/windows/shopwindow.h2
-rw-r--r--src/gui/windows/skilldialog.cpp2
-rw-r--r--src/gui/windows/socialwindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp34
-rw-r--r--src/gui/windows/tradewindow.cpp2
-rw-r--r--src/gui/windows/unregisterdialog.cpp4
-rw-r--r--src/gui/windows/updaterwindow.cpp13
-rw-r--r--src/gui/windows/whoisonline.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
38 files changed, 55 insertions, 105 deletions
diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h
index bef09083e..7aaa1e7c5 100644
--- a/src/gui/windows/buydialog.h
+++ b/src/gui/windows/buydialog.h
@@ -24,7 +24,6 @@
#define GUI_WINDOWS_BUYDIALOG_H
#include "enums/simpletypes/beingid.h"
-#include "enums/simpletypes/visible.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/buyingstoreselldialog.cpp b/src/gui/windows/buyingstoreselldialog.cpp
index f99251eb0..55b6a96fb 100644
--- a/src/gui/windows/buyingstoreselldialog.cpp
+++ b/src/gui/windows/buyingstoreselldialog.cpp
@@ -26,7 +26,6 @@
#include "inventory.h"
#include "shopitem.h"
-#include "being/being.h"
#include "being/playerinfo.h"
#include "gui/models/shopitems.h"
diff --git a/src/gui/windows/buyselldialog.h b/src/gui/windows/buyselldialog.h
index dc7435126..a8041fb99 100644
--- a/src/gui/windows/buyselldialog.h
+++ b/src/gui/windows/buyselldialog.h
@@ -24,7 +24,6 @@
#define GUI_WINDOWS_BUYSELLDIALOG_H
#include "enums/simpletypes/beingid.h"
-#include "enums/simpletypes/visible.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index 4ab2c690c..fdafe5fed 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
@@ -40,6 +38,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
ChangeEmailDialog::ChangeEmailDialog(LoginData *const data) :
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index ed6ac578b..fda845d39 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
@@ -41,6 +39,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
ChangePasswordDialog::ChangePasswordDialog(LoginData *const data) :
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 436c4d841..049d91dc6 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -26,10 +26,6 @@
#include "enums/being/beingdirection.h"
-#include "enums/gui/dialogtype.h"
-
-#include "enums/input/inputaction.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 0ffba7984..4a69db0be 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -26,17 +26,11 @@
#include "configuration.h"
#include "units.h"
-#include "enums/being/attributes.h"
-
-#include "enums/input/inputaction.h"
-
#include "listeners/charrenamelistener.h"
#ifdef EATHENA_SUPPORT
#include "listeners/pincodelistener.h"
#endif
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/chardeleteconfirm.h"
#include "gui/windows/editdialog.h"
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 7a62ad755..18c323339 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -33,8 +33,6 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
-
#include "input/inputmanager.h"
#include "gui/chatconsts.h"
@@ -75,6 +73,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
ChatWindow *chatWindow = nullptr;
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 1952909d4..ca8250fa0 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -26,7 +26,6 @@
#include "enums/gui/chatmsgtype.h"
#include "enums/simpletypes/ignorerecord.h"
-#include "enums/simpletypes/visible.h"
#include "enums/simpletypes/tryremovecolors.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/didyouknowwindow.h b/src/gui/windows/didyouknowwindow.h
index 4de462e97..d02d627f4 100644
--- a/src/gui/windows/didyouknowwindow.h
+++ b/src/gui/windows/didyouknowwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_DIDYOUKNOWWINDOW_H
#define GUI_WINDOWS_DIDYOUKNOWWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/linkhandler.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 18319dbde..5fb3ac714 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -21,10 +21,6 @@
#include "gui/windows/editserverdialog.h"
-#include "enums/gui/dialogtype.h"
-
-#include "enums/input/inputaction.h"
-
#include "gui/models/typelistmodel.h"
#include "gui/windows/okdialog.h"
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 9c6602176..8e7d47f65 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -42,8 +42,6 @@
#include "gui/widgets/playerbox.h"
#include "gui/widgets/tabstrip.h"
-#include "render/renderers.h"
-
#include "resources/equipmentslots.h"
#include "resources/imageset.h"
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index c5934b7ba..4c11f1603 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -26,10 +26,6 @@
#include "item.h"
#include "units.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/progresscolorid.h"
-
#include "being/playerinfo.h"
#include "input/inputmanager.h"
@@ -94,8 +90,9 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mRetrieveButton(nullptr),
mInvCloseButton(nullptr),
mWeightBar(nullptr),
- mSlotsBar(new ProgressBar(this, 0.0F, 100, 0, ProgressColorId::PROG_INVY_SLOTS,
- "slotsprogressbar.xml", "slotsprogressbar_fill.xml")),
+ mSlotsBar(new ProgressBar(this, 0.0F, 100, 0,
+ ProgressColorId::PROG_INVY_SLOTS,
+ "slotsprogressbar.xml", "slotsprogressbar_fill.xml")),
mFilter(nullptr),
mSortModel(new SortListModelInv),
mSortDropDown(new DropDown(this, mSortModel, false,
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index c220b75aa..062ac6bce 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -25,8 +25,6 @@
#include "inventory.h"
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index c765c5b5a..cdc2ed429 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -34,8 +34,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "utils/gettext.h"
#ifdef WIN32
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 2d7adc09f..5203bc228 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -25,8 +25,6 @@
#include "client.h"
#include "configuration.h"
-#include "enums/input/inputaction.h"
-
#include "listeners/openurllistener.h"
#include "gui/models/updatelistmodel.h"
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index e1edbb74b..530e71090 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -253,7 +253,7 @@ void MailWindow::viewPrev(const int id)
if (it == mMessages.begin())
{
it = mMessages.end();
- mListBox->setSelected(mMessages.size() - 1);
+ mListBox->setSelected(static_cast<int>(mMessages.size()) - 1);
}
else
{
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index ea22db3f4..9e2cb4b81 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -31,6 +31,7 @@
#include "gui/popupmanager.h"
#include "gui/viewport.h"
+#include "gui/userpalette.h"
#include "gui/popups/popupmenu.h"
#include "gui/popups/textpopup.h"
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 42a499771..65bef8e5c 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -26,10 +26,6 @@
#include "configuration.h"
#include "inventory.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/progresscolorid.h"
-
#include "being/localplayer.h"
#include "being/playerinfo.h"
@@ -88,7 +84,8 @@ MiniStatusWindow::MiniStatusWindow() :
// TRANSLATORS: status bar name
"xp bar", _("experience bar"))),
mJobBar(nullptr),
- mWeightBar(createBar(0, 140, 0, ThemeColorId::WEIGHT_BAR, ProgressColorId::PROG_WEIGHT,
+ mWeightBar(createBar(0, 140, 0, ThemeColorId::WEIGHT_BAR,
+ ProgressColorId::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml",
// TRANSLATORS: status bar name
"weight bar", _("weight bar"))),
@@ -98,16 +95,19 @@ MiniStatusWindow::MiniStatusWindow() :
"inventory slots bar",
// TRANSLATORS: status bar name
_("inventory slots bar"))),
- mMoneyBar(createBar(0, 130, 0, ThemeColorId::MONEY_BAR, ProgressColorId::PROG_MONEY,
+ mMoneyBar(createBar(0, 130, 0, ThemeColorId::MONEY_BAR,
+ ProgressColorId::PROG_MONEY,
"moneyprogressbar.xml", "moneyprogressbar_fill.xml",
// TRANSLATORS: status bar name
"money bar", _("money bar"))),
- mArrowsBar(createBar(0, 50, 0, ThemeColorId::ARROWS_BAR, ProgressColorId::PROG_ARROWS,
+ mArrowsBar(createBar(0, 50, 0, ThemeColorId::ARROWS_BAR,
+ ProgressColorId::PROG_ARROWS,
"arrowsprogressbar.xml", "arrowsprogressbar_fill.xml",
// TRANSLATORS: status bar name
"arrows bar", _("arrows bar"))),
mStatusBar(createBar(100, (config.getIntValue("fontSize") > 16
- ? 250 : 165), 0, ThemeColorId::STATUS_BAR, ProgressColorId::PROG_STATUS,
+ ? 250 : 165), 0, ThemeColorId::STATUS_BAR,
+ ProgressColorId::PROG_STATUS,
"statusprogressbar.xml", "statusprogressbar_fill.xml",
// TRANSLATORS: status bar name
"status bar", _("status bar"))),
@@ -130,7 +130,9 @@ MiniStatusWindow::MiniStatusWindow() :
if (job)
{
- mJobBar = createBar(0, 100, 0, ThemeColorId::JOB_BAR, ProgressColorId::PROG_JOB,
+ mJobBar = createBar(0, 100, 0,
+ ThemeColorId::JOB_BAR,
+ ProgressColorId::PROG_JOB,
// TRANSLATORS: status bar name
"jobprogressbar.xml", "jobprogressbar_fill.xml",
"job bar", _("job bar"));
diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h
index cae3cd414..0146b3f00 100644
--- a/src/gui/windows/ministatuswindow.h
+++ b/src/gui/windows/ministatuswindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_MINISTATUSWINDOW_H
#define GUI_WINDOWS_MINISTATUSWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "listeners/arrowslistener.h"
#include "listeners/attributelistener.h"
#include "listeners/inventorylistener.h"
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 4f38dd66b..62ebd28bf 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -31,8 +31,6 @@
#include "being/being.h"
-#include "enums/net/packettype.h"
-
#include "gui/gui.h"
#include "gui/viewport.h"
@@ -65,6 +63,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
// TRANSLATORS: npc dialog button
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index 5d6786255..cdb5bff2a 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -25,7 +25,6 @@
#include "enums/simpletypes/beingid.h"
#include "enums/simpletypes/beingtypeid.h"
-#include "enums/simpletypes/visible.h"
#include "gui/models/extendedlistmodel.h"
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index c1d9b1d24..f5eadd440 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -47,6 +47,8 @@
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
OutfitWindow *outfitWindow = nullptr;
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index d16a22ff8..9c5a2dee1 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -27,8 +27,6 @@
#include "soundconsts.h"
#include "soundmanager.h"
-#include "enums/input/inputaction.h"
-
#include "gui/dialogsmanager.h"
#include "gui/viewport.h"
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 1f0dc68e2..d2c878e68 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -24,10 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
-#include "enums/input/inputaction.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 684ff448a..bd0f992e8 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -27,8 +27,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "net/download.h"
#include "gui/widgets/checkbox.h"
diff --git a/src/gui/windows/setupwindow.h b/src/gui/windows/setupwindow.h
index de274281f..263877c0e 100644
--- a/src/gui/windows/setupwindow.h
+++ b/src/gui/windows/setupwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_SETUPWINDOW_H
#define GUI_WINDOWS_SETUPWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/shopselldialog.cpp b/src/gui/windows/shopselldialog.cpp
index db5a64aca..d4683eedf 100644
--- a/src/gui/windows/shopselldialog.cpp
+++ b/src/gui/windows/shopselldialog.cpp
@@ -22,8 +22,6 @@
#include "gui/windows/shopselldialog.h"
-#include "shopitem.h"
-
#include "being/playerinfo.h"
#include "gui/windows/tradewindow.h"
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index ae5de90a1..9e45a9b71 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -22,8 +22,6 @@
#include "gui/windows/shopwindow.h"
-#include "enums/being/attributes.h"
-
#ifdef TMWA_SUPPORT
#include "gui/windows/buydialog.h"
#include "gui/windows/chatwindow.h"
@@ -90,6 +88,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
ShopWindow *shopWindow = nullptr;
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 9a2074cf2..ea70bf3c2 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_SHOPWINDOW_H
#define GUI_WINDOWS_SHOPWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 6617c200c..b4cda6302 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -30,8 +30,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/setupwindow.h"
#include "gui/windows/shortcutwindow.h"
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 5889041e7..a8584d643 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -21,8 +21,6 @@
#include "gui/windows/socialwindow.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/windows/setupwindow.h"
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 39dfaa7e2..57f7d6f1e 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -28,10 +28,6 @@
#include "settings.h"
#include "units.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/progresscolorid.h"
-
#include "being/localplayer.h"
#include "being/playerinfo.h"
@@ -112,17 +108,24 @@ StatusWindow::StatusWindow() :
if (!max)
max = 1;
- mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
- Attributes::HP)) / static_cast<float>(max), 80, 0, ProgressColorId::PROG_HP,
+ mHpBar = new ProgressBar(this,
+ static_cast<float>(PlayerInfo::getAttribute(Attributes::HP))
+ / static_cast<float>(max),
+ 80,
+ 0,
+ ProgressColorId::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml");
mHpBar->setColor(getThemeColor(ThemeColorId::HP_BAR),
getThemeColor(ThemeColorId::HP_BAR_OUTLINE));
max = PlayerInfo::getAttribute(Attributes::EXP_NEEDED);
- mXpBar = new ProgressBar(this, max ?
- static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP))
- / static_cast<float>(max) : static_cast<float>(0), 80, 0,
- ProgressColorId::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml");
+ mXpBar = new ProgressBar(this,
+ max ? static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP))
+ / static_cast<float>(max) : static_cast<float>(0),
+ 80,
+ 0,
+ ProgressColorId::PROG_EXP,
+ "xpprogressbar.xml", "xpprogressbar_fill.xml");
mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR),
getThemeColor(ThemeColorId::XP_BAR_OUTLINE));
@@ -135,10 +138,13 @@ StatusWindow::StatusWindow() :
// TRANSLATORS: status window label
mMpLabel = new Label(this, _("MP:"));
const bool useMagic = playerHandler->canUseMagic();
- mMpBar = new ProgressBar(this, max ? static_cast<float>(
- PlayerInfo::getAttribute(Attributes::MAX_MP))
- / static_cast<float>(max) : static_cast<float>(0),
- 80, 0, useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP,
+ mMpBar = new ProgressBar(this,
+ max ? static_cast<float>(PlayerInfo::getAttribute(
+ Attributes::MAX_MP)) / static_cast<float>(max)
+ : static_cast<float>(0),
+ 80,
+ 0,
+ useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP,
useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml",
useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index c5951a7a5..7d1173856 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -30,8 +30,6 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
-
#include "gui/gui.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp
index 5e8df8298..90c9bd404 100644
--- a/src/gui/windows/unregisterdialog.cpp
+++ b/src/gui/windows/unregisterdialog.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
@@ -40,6 +38,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
UnRegisterDialog::UnRegisterDialog(LoginData *const data) :
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index ae63d194a..1ef2b7e2c 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -26,12 +26,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/gui/progresscolorid.h"
-
-#include "enums/input/inputaction.h"
-
-#include "enums/net/updatetype.h"
-
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
#include "gui/widgets/containerplacer.h"
@@ -58,6 +52,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
UpdaterWindow *updaterWindow = nullptr;
@@ -193,8 +189,9 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
// TRANSLATORS: updater window button
mPlayButton(new Button(this, _("Play"), "play", this)),
- mProgressBar(new ProgressBar(this, 0.0, 310, 0, ProgressColorId::PROG_UPDATE,
- "updateprogressbar.xml", "updateprogressbar_fill.xml")),
+ mProgressBar(new ProgressBar(this, 0.0, 310, 0,
+ ProgressColorId::PROG_UPDATE,
+ "updateprogressbar.xml", "updateprogressbar_fill.xml")),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index db6e2ab4e..9ff00cd34 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -48,8 +48,6 @@
#include "being/localplayer.h"
#include "being/playerrelations.h"
-#include "enums/net/packettype.h"
-
#ifdef TMWA_SUPPORT
#include "net/download.h"
#endif
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index a2604cf80..3fc06293d 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -25,8 +25,6 @@
#include "client.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/widgets/button.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/listbox.h"