summaryrefslogtreecommitdiff
path: root/src/gui
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
parentac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff)
downloadplus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz
plus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2
plus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz
plus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogsmanager.cpp4
-rw-r--r--src/gui/dialogsmanager.h1
-rw-r--r--src/gui/fonts/textchunklist_unittest.cc82
-rw-r--r--src/gui/palette.h5
-rw-r--r--src/gui/popups/itempopup.cpp6
-rw-r--r--src/gui/popups/speechbubble.h8
-rw-r--r--src/gui/theme.cpp3
-rw-r--r--src/gui/themecolorsidoperators.h6
-rw-r--r--src/gui/userpalette.cpp302
-rw-r--r--src/gui/userpalette.h2
-rw-r--r--src/gui/viewport.cpp1
-rw-r--r--src/gui/widgets/avatarlistbox.cpp10
-rw-r--r--src/gui/widgets/basiccontainer.cpp2
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/characterdisplay.cpp2
-rw-r--r--src/gui/widgets/chatinput.h2
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/inttextfield.cpp5
-rw-r--r--src/gui/widgets/listbox.cpp5
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp2
-rw-r--r--src/gui/widgets/selldialog.h2
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/skilldata.h2
-rw-r--r--src/gui/widgets/skillinfo.cpp2
-rw-r--r--src/gui/widgets/skillinfo.h3
-rw-r--r--src/gui/widgets/slider.cpp6
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp7
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp8
-rw-r--r--src/gui/widgets/tabs/socialguildtab.h3
-rw-r--r--src/gui/widgets/tabs/socialguildtab2.h6
-rw-r--r--src/gui/widgets/tabs/socialpartytab.h3
-rw-r--r--src/gui/widgets/tabs/tab.cpp8
-rw-r--r--src/gui/widgets/textbox.cpp2
-rw-r--r--src/gui/widgets/window.h1
-rw-r--r--src/gui/windowmenu.h2
-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
84 files changed, 356 insertions, 335 deletions
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp
index e8aa8cc2d..3425bc5a2 100644
--- a/src/gui/dialogsmanager.cpp
+++ b/src/gui/dialogsmanager.cpp
@@ -25,10 +25,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/dialogtype.h"
-
#include "being/playerinfo.h"
#include "gui/widgets/selldialog.h"
diff --git a/src/gui/dialogsmanager.h b/src/gui/dialogsmanager.h
index 11a4545ad..4dd4bcf7b 100644
--- a/src/gui/dialogsmanager.h
+++ b/src/gui/dialogsmanager.h
@@ -24,7 +24,6 @@
#define GUI_DIALOGSMANAGER_H
#include "enums/simpletypes/modal.h"
-#include "enums/simpletypes/showcenter.h"
#include "listeners/attributelistener.h"
#include "listeners/playerdeathlistener.h"
diff --git a/src/gui/fonts/textchunklist_unittest.cc b/src/gui/fonts/textchunklist_unittest.cc
index 116a386e5..f245af664 100644
--- a/src/gui/fonts/textchunklist_unittest.cc
+++ b/src/gui/fonts/textchunklist_unittest.cc
@@ -96,7 +96,7 @@ TEST_CASE("TextChunkList addRemoveBack 1", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
list.insertFirst(chunk);
@@ -113,9 +113,9 @@ TEST_CASE("TextChunkList addRemoveBack 2", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(1, 2, 4), Color(1, 2, 5), nullptr);
list.insertFirst(chunk2);
@@ -140,9 +140,9 @@ TEST_CASE("TextChunkList addRemoveBack 3", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(2, 3, 4), Color(2, 3, 4), nullptr);
list.insertFirst(chunk2);
@@ -161,11 +161,11 @@ TEST_CASE("TextChunkList addRemoveBack 4", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(2, 3, 4), Color(2, 3, 4), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(3, 4, 5), Color(3, 4, 5), nullptr);
list.insertFirst(chunk3);
@@ -191,7 +191,7 @@ TEST_CASE("TextChunkList moveToFirst 1", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(1, 2, 3), Color(2, 3, 4), nullptr);
list.insertFirst(chunk);
@@ -208,9 +208,9 @@ TEST_CASE("TextChunkList moveToFirst 2", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(2, 3, 4), Color(1, 2, 3), nullptr);
list.insertFirst(chunk1);
@@ -230,11 +230,11 @@ TEST_CASE("TextChunkList moveToFirst 3", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 4), Color(1, 2, 3), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(1, 2, 5), Color(1, 2, 3), nullptr);
list.insertFirst(chunk3);
@@ -257,11 +257,11 @@ TEST_CASE("TextChunkList moveToFirst 4", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(), Color(), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(), Color(), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(), Color(), nullptr);
list.insertFirst(chunk1);
@@ -283,9 +283,9 @@ TEST_CASE("TextChunkList moveToFirst 4", "TextChunkList")
TEST_CASE("TextChunkList clear 1", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(), Color(), nullptr);
list.insertFirst(chunk);
@@ -302,13 +302,13 @@ TEST_CASE("TextChunkList clear 1", "TextChunkList")
TEST_CASE("TextChunkList clear 2", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -327,13 +327,13 @@ TEST_CASE("TextChunkList clear 2", "TextChunkList")
TEST_CASE("TextChunkList clear 3", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -358,13 +358,13 @@ TEST_CASE("TextChunkList clear 3", "TextChunkList")
TEST_CASE("TextChunkList clear 4", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -389,9 +389,9 @@ TEST_CASE("TextChunkList clear 4", "TextChunkList")
TEST_CASE("TextChunkList remove 1", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(), Color(), nullptr);
list.insertFirst(chunk);
@@ -409,13 +409,13 @@ TEST_CASE("TextChunkList remove 1", "TextChunkList")
TEST_CASE("TextChunkList remove 2", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test1",
+ TextChunk *const chunk1 = new TextChunk("test1",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -435,13 +435,13 @@ TEST_CASE("TextChunkList remove 2", "TextChunkList")
TEST_CASE("TextChunkList remove 3", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test1",
+ TextChunk *const chunk1 = new TextChunk("test1",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
diff --git a/src/gui/palette.h b/src/gui/palette.h
index bee83daf3..6c96b3572 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -24,10 +24,7 @@
#ifndef GUI_PALETTE_H
#define GUI_PALETTE_H
-#include "logger.h"
-
#include "enums/gui/gradienttype.h"
-#include "enums/gui/usercolorid.h"
#include "gui/color.h"
@@ -39,6 +36,8 @@
#include <map>
#include <set>
+#include <string>
+#include <vector>
// Default Gradient Delay
#define GRADIENT_DELAY 40
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 5ae6830cc..6121c288f 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -249,8 +249,10 @@ void ItemPopup::setLabelColor(Label *label, const ItemType::Type type) const
{
caseSetColor(ItemType::UNUSABLE, ThemeColorId::GENERIC)
caseSetColor(ItemType::USABLE, ThemeColorId::USABLE)
- caseSetColor(ItemType::EQUIPMENT_ONE_HAND_WEAPON, ThemeColorId::ONEHAND)
- caseSetColor(ItemType::EQUIPMENT_TWO_HANDS_WEAPON, ThemeColorId::TWOHAND)
+ caseSetColor(ItemType::EQUIPMENT_ONE_HAND_WEAPON,
+ ThemeColorId::ONEHAND)
+ caseSetColor(ItemType::EQUIPMENT_TWO_HANDS_WEAPON,
+ ThemeColorId::TWOHAND)
caseSetColor(ItemType::EQUIPMENT_TORSO, ThemeColorId::TORSO)
caseSetColor(ItemType::EQUIPMENT_ARMS, ThemeColorId::ARMS)
caseSetColor(ItemType::EQUIPMENT_HEAD, ThemeColorId::HEAD)
diff --git a/src/gui/popups/speechbubble.h b/src/gui/popups/speechbubble.h
index 7f09ca187..b44bb1d13 100644
--- a/src/gui/popups/speechbubble.h
+++ b/src/gui/popups/speechbubble.h
@@ -45,10 +45,10 @@ class SpeechBubble final : public Popup
* Sets the name displayed for the speech bubble, and in what color.
*/
void setCaption(const std::string &name,
- const Color *const color1 =
- &theme->getColor(ThemeColorId::BUBBLE_NAME, 255),
- const Color *const color2 =
- &theme->getColor(ThemeColorId::BUBBLE_NAME_OUTLINE, 255));
+ const Color *const color1 = &theme->getColor(
+ ThemeColorId::BUBBLE_NAME, 255),
+ const Color *const color2 = &theme->getColor(
+ ThemeColorId::BUBBLE_NAME_OUTLINE, 255));
/**
* Sets the text to be displayed.
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 9735fc05b..3881311a9 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -27,9 +27,6 @@
#include "configuration.h"
#include "graphicsmanager.h"
-#include "enums/gui/progresscolorid.h"
-#include "enums/gui/themecolorid.h"
-
#include "gui/skin.h"
#include "gui/themeinfo.h"
diff --git a/src/gui/themecolorsidoperators.h b/src/gui/themecolorsidoperators.h
index b4781ed2d..eace32c72 100644
--- a/src/gui/themecolorsidoperators.h
+++ b/src/gui/themecolorsidoperators.h
@@ -18,11 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_THEMECOLORIDOPERATOR_H
-#define GUI_THEMECOLORIDOPERATOR_H
+#ifndef GUI_THEMECOLORIDOPERATORS_H
+#define GUI_THEMECOLORIDOPERATORS_H
#include "enums/gui/themecolorid.h"
ThemeColorIdT operator+(const ThemeColorIdT &id, const int& i);
-#endif // GUI_THEMECOLORIDOPERATOR_H
+#endif // GUI_THEMECOLORIDOPERATORS_H
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index bb82b3b78..8ae5cb8b0 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -23,8 +23,6 @@
#include "gui/userpalette.h"
-#include "enums/gui/usercolorid.h"
-
#include "configuration.h"
#include "utils/gettext.h"
@@ -114,117 +112,239 @@ UserPalette::UserPalette() :
mColors[static_cast<size_t>(UserColorId::NPC)] = ColorElem();
mColors[static_cast<size_t>(UserColorId::MONSTER)] = ColorElem();
- // TRANSLATORS: palette color
- addColor(UserColorId::BEING, 0xffffff, GradientType::STATIC, _("Being"));
- // TRANSLATORS: palette color
- addColor(UserColorId::FRIEND, 0xb0ffb0, GradientType::STATIC, _("Friend names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::DISREGARDED, 0xa00000, GradientType::STATIC, _("Disregarded names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::IGNORED, 0xff0000, GradientType::STATIC, _("Ignored names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::ERASED, 0xff0000, GradientType::STATIC, _("Erased names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PC, 0xffffff, GradientType::STATIC, _("Other players names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::SELF, 0xff8040, GradientType::STATIC, _("Own name"));
- // TRANSLATORS: palette color
- addColor(UserColorId::GM, 0x00ff00, GradientType::STATIC, _("GM names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::NPC, 0xc8c8ff, GradientType::STATIC, _("NPCs"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MONSTER, 0xff4040, GradientType::STATIC, _("Monsters"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MONSTER_HP, 0x00ff00, GradientType::STATIC, _("Monster HP bar"), 50);
- addColor(UserColorId::MONSTER_HP2, 0xff0000, GradientType::STATIC,
- // TRANSLATORS: palette color
- _("Monster HP bar (second color)"), 50);
- // TRANSLATORS: palette color
- addColor(UserColorId::PARTY, 0xff00d8, GradientType::STATIC, _("Party members"));
- // TRANSLATORS: palette color
- addColor(UserColorId::GUILD, 0xff00d8, GradientType::STATIC, _("Guild members"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PARTICLE, 0xffffff, GradientType::STATIC, _("Particle effects"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PICKUP_INFO, 0x28dc28, GradientType::STATIC, _("Pickup notification"));
- // TRANSLATORS: palette color
- addColor(UserColorId::EXP_INFO, 0xffff00, GradientType::STATIC, _("Exp notification"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PLAYER_HP, 0x00ff00, GradientType::STATIC, _("Player HP bar"), 50);
- // TRANSLATORS: palette color
- addColor(UserColorId::PLAYER_HP2, 0xff0000, GradientType::STATIC,
- // TRANSLATORS: palette color
- _("Player HP bar (second color)"), 50);
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_PLAYER_MONSTER, 0x0064ff, GradientType::STATIC, _("Player hits monster"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_MONSTER_PLAYER, 0xff3232, GradientType::STATIC, _("Monster hits player"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_PLAYER_PLAYER, 0xff5050, GradientType::STATIC,
+ addColor(UserColorId::BEING,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Being"));
+ addColor(UserColorId::FRIEND,
+ 0xb0ffb0,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Friend names"));
+ addColor(UserColorId::DISREGARDED,
+ 0xa00000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Disregarded names"));
+ addColor(UserColorId::IGNORED,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Ignored names"));
+ addColor(UserColorId::ERASED,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Erased names"));
+ addColor(UserColorId::PC,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Other players names"));
+ addColor(UserColorId::SELF,
+ 0xff8040,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Own name"));
+ addColor(UserColorId::GM,
+ 0x00ff00,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("GM names"));
+ addColor(UserColorId::NPC,
+ 0xc8c8ff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("NPCs"));
+ addColor(UserColorId::MONSTER,
+ 0xff4040,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monsters"));
+ addColor(UserColorId::MONSTER_HP,
+ 0x00ff00,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monster HP bar"),
+ 50);
+ addColor(UserColorId::MONSTER_HP2,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monster HP bar (second color)"),
+ 50);
+ addColor(UserColorId::PARTY,
+ 0xff00d8,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Party members"));
+ addColor(UserColorId::GUILD,
+ 0xff00d8,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Guild members"));
+ addColor(UserColorId::PARTICLE,
+ 0xffffff,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Particle effects"));
+ addColor(UserColorId::PICKUP_INFO,
+ 0x28dc28,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Pickup notification"));
+ addColor(UserColorId::EXP_INFO,
+ 0xffff00,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Exp notification"));
+ addColor(UserColorId::PLAYER_HP,
+ 0x00ff00,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Player HP bar"), 50);
+ addColor(UserColorId::PLAYER_HP2,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Player HP bar (second color)"),
+ 50);
+ addColor(UserColorId::HIT_PLAYER_MONSTER,
+ 0x0064ff,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Player hits monster"));
+ addColor(UserColorId::HIT_MONSTER_PLAYER,
+ 0xff3232,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Monster hits player"));
+ addColor(UserColorId::HIT_PLAYER_PLAYER,
+ 0xff5050,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Other player hits local player"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_CRITICAL, 0xff0000, GradientType::RAINBOW, _("Critical Hit"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_LOCAL_PLAYER_MONSTER, 0x00ff00, GradientType::STATIC,
+ addColor(UserColorId::HIT_CRITICAL,
+ 0xff0000,
+ // TRANSLATORS: palette color
+ GradientType::RAINBOW,
+ _("Critical Hit"));
+ addColor(UserColorId::HIT_LOCAL_PLAYER_MONSTER,
+ 0x00ff00,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Local player hits monster"));
- addColor(UserColorId::HIT_LOCAL_PLAYER_CRITICAL, 0xff0000, GradientType::RAINBOW,
+ addColor(UserColorId::HIT_LOCAL_PLAYER_CRITICAL,
+ 0xff0000,
+ GradientType::RAINBOW,
// TRANSLATORS: palette color
_("Local player critical hit"));
- addColor(UserColorId::HIT_LOCAL_PLAYER_MISS, 0x00ffa6, GradientType::STATIC,
- // TRANSLATORS: palette color
+ addColor(UserColorId::HIT_LOCAL_PLAYER_MISS,
+ 0x00ffa6,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
_("Local player miss"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MISS, 0xffff00, GradientType::STATIC, _("Misses"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PORTAL_HIGHLIGHT, 0xC80000, GradientType::STATIC, _("Portal highlight"));
- addColor(UserColorId::COLLISION_HIGHLIGHT, 0x0000C8, GradientType::STATIC,
+ addColor(UserColorId::MISS, 0xffff00,
// TRANSLATORS: palette color
- _("Default collision highlight"), 64);
- addColor(UserColorId::AIR_COLLISION_HIGHLIGHT, 0xe0e0ff, GradientType::STATIC,
+ GradientType::STATIC,
+ _("Misses"));
+ addColor(UserColorId::PORTAL_HIGHLIGHT,
+ 0xC80000,
// TRANSLATORS: palette color
- _("Air collision highlight"), 64);
- addColor(UserColorId::WATER_COLLISION_HIGHLIGHT, 0x2050e0, GradientType::STATIC,
+ GradientType::STATIC,
+ _("Portal highlight"));
+ addColor(UserColorId::COLLISION_HIGHLIGHT,
+ 0x0000C8,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Water collision highlight"), 64);
- addColor(UserColorId::GROUNDTOP_COLLISION_HIGHLIGHT, 0xffff00, GradientType::STATIC,
+ _("Default collision highlight"),
+ 64);
+ addColor(UserColorId::AIR_COLLISION_HIGHLIGHT,
+ 0xe0e0ff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Special ground collision highlight"), 20);
- addColor(UserColorId::WALKABLE_HIGHLIGHT, 0x00D000, GradientType::STATIC,
+ _("Air collision highlight"),
+ 64);
+ addColor(UserColorId::WATER_COLLISION_HIGHLIGHT,
+ 0x2050e0,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Walkable highlight"), 255);
- addColor(UserColorId::ATTACK_RANGE, 0xffffff, GradientType::STATIC,
+ _("Water collision highlight"),
+ 64);
+ addColor(UserColorId::GROUNDTOP_COLLISION_HIGHLIGHT,
+ 0xffff00,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Local player attack range"), 5);
- addColor(UserColorId::ATTACK_RANGE_BORDER, 0x0, GradientType::STATIC,
+ _("Special ground collision highlight"),
+ 20);
+ addColor(UserColorId::WALKABLE_HIGHLIGHT,
+ 0x00D000,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Local player attack range border"), 76);
- addColor(UserColorId::MONSTER_ATTACK_RANGE, 0xff0000, GradientType::STATIC,
+ _("Walkable highlight"),
+ 255);
+ addColor(UserColorId::ATTACK_RANGE,
+ 0xffffff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Monster attack range"), 20);
-
- addColor(UserColorId::FLOOR_ITEM_TEXT, 0xffffff, GradientType::STATIC,
+ _("Local player attack range"),
+ 5);
+ addColor(UserColorId::ATTACK_RANGE_BORDER,
+ 0x0,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Local player attack range border"),
+ 76);
+ addColor(UserColorId::MONSTER_ATTACK_RANGE,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monster attack range"),
+ 20);
+ addColor(UserColorId::FLOOR_ITEM_TEXT,
+ 0xffffff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Floor item amount color"), 100);
- addColor(UserColorId::HOME_PLACE, 0xffffff, GradientType::STATIC,
+ _("Floor item amount color"),
+ 100);
+ addColor(UserColorId::HOME_PLACE,
+ 0xffffff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Home place"), 20);
- addColor(UserColorId::HOME_PLACE_BORDER, 0xffff00, GradientType::STATIC,
+ _("Home place"),
+ 20);
+ addColor(UserColorId::HOME_PLACE_BORDER,
+ 0xffff00,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Home place border"), 200);
- addColor(UserColorId::ROAD_POINT, 0x000000, GradientType::STATIC,
+ _("Home place border"),
+ 200);
+ addColor(UserColorId::ROAD_POINT,
+ 0x000000,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Road point"), 100);
- addColor(UserColorId::NET, 0x000000, GradientType::STATIC,
+ addColor(UserColorId::NET,
+ 0x000000,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Tiles border"), 64);
- // TRANSLATORS: palette color
- addColor(UserColorId::PET, 0xffffff, GradientType::STATIC, _("Pets"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MERCENARY, 0xffffff, GradientType::STATIC, _("Mercenary"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HOMUNCULUS, 0xffffff, GradientType::STATIC, _("Homunculus"));
+ addColor(UserColorId::PET,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Pets"));
+ addColor(UserColorId::MERCENARY,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Mercenary"));
+ addColor(UserColorId::HOMUNCULUS,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Homunculus"));
commit(true);
}
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 1a7af763b..e5e9465f9 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -24,6 +24,8 @@
#ifndef GUI_USERPALETTE_H
#define GUI_USERPALETTE_H
+#include "logger.h"
+
#include "enums/gui/usercolorid.h"
#include "gui/palette.h"
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 7bb6e2eef..42c002d39 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -42,6 +42,7 @@
#include "gui/gui.h"
#include "gui/popupmanager.h"
+#include "gui/userpalette.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index d5b6cbaf8..47debb1e7 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -25,8 +25,6 @@
#include "configuration.h"
#include "graphicsvertexes.h"
-#include "enums/gui/progresscolorid.h"
-
#include "being/localplayer.h"
#include "gui/gui.h"
@@ -42,8 +40,6 @@
#include "gui/windows/chatwindow.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "resources/mapitemtype.h"
@@ -180,7 +176,8 @@ void AvatarListBox::draw(Graphics *graphics)
if (a->getMaxHp())
{
const ProgressColorIdT themeColor = (isPoison
- ? ProgressColorId::PROG_HP_POISON : ProgressColorId::PROG_HP);
+ ? ProgressColorId::PROG_HP_POISON
+ : ProgressColorId::PROG_HP);
Color color = Theme::getProgressColor(
themeColor, static_cast<float>(a->getHp())
/ static_cast<float>(a->getMaxHp()));
@@ -417,7 +414,8 @@ void AvatarListBox::safeDraw(Graphics *graphics)
if (a->getMaxHp())
{
const ProgressColorIdT themeColor = (isPoison
- ? ProgressColorId::PROG_HP_POISON : ProgressColorId::PROG_HP);
+ ? ProgressColorId::PROG_HP_POISON
+ : ProgressColorId::PROG_HP);
Color color = Theme::getProgressColor(
themeColor, static_cast<float>(a->getHp())
/ static_cast<float>(a->getMaxHp()));
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp
index bcf30a27f..1be1d4bc0 100644
--- a/src/gui/widgets/basiccontainer.cpp
+++ b/src/gui/widgets/basiccontainer.cpp
@@ -63,8 +63,6 @@
#include "gui/widgets/basiccontainer.h"
-#include "render/renderers.h"
-
#include <algorithm>
#include "debug.h"
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 842286ecb..98140e71c 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -68,8 +68,6 @@
#include "graphicsvertexes.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "resources/image.h"
#include "resources/imageset.h"
#include "resources/imagerect.h"
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index df0032990..b7af55018 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -24,8 +24,6 @@
#include "units.h"
-#include "enums/being/attributes.h"
-
#include "gui/gui.h"
#include "gui/windows/charselectdialog.h"
diff --git a/src/gui/widgets/chatinput.h b/src/gui/widgets/chatinput.h
index 592299312..1d2b6b426 100644
--- a/src/gui/widgets/chatinput.h
+++ b/src/gui/widgets/chatinput.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_CHATINPUT_H
#define GUI_WIDGETS_CHATINPUT_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/windows/chatwindow.h"
#include "configuration.h"
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index f7dbf3526..b5818308b 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 890a2af1f..d637b7194 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -24,8 +24,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/skin.h"
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 7d9506546..f40a855ec 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -25,8 +25,6 @@
#include "resources/imageset.h"
#include "resources/resourcemanager.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index d5242520f..6fa605c8b 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -24,8 +24,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/models/tablemodel.h"
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index b0e902223..fa525f87d 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -26,9 +26,10 @@
#include "gui/sdlinput.h"
#endif
-#include "enums/input/inputaction.h"
-
#include "utils/stringutils.h"
+
+#include <sstream>
+
#include "debug.h"
IntTextField::IntTextField(const Widget2 *const widget,
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 8e0bd2921..85e1a5b8f 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "listeners/selectionlistener.h"
#include "gui/focushandler.h"
@@ -95,7 +93,8 @@ ListBox::ListBox(const Widget2 *const widget,
mSelectionListeners(),
mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
mForegroundSelectedColor(getThemeColor(ThemeColorId::LISTBOX_SELECTED)),
- mForegroundSelectedColor2(getThemeColor(ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
+ mForegroundSelectedColor2(getThemeColor(
+ ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
mOldSelected(-1),
mPadding(0),
mPressedIndex(-2),
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 181d6a46b..f2fe431f1 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -30,8 +30,6 @@
#include "gui/widgets/windowcontainer.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 2965fc410..59951c960 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -30,8 +30,6 @@
#include "gui/fonts/font.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 571568e6c..89ee13e85 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_PROGRESSBAR_H
#define GUI_WIDGETS_PROGRESSBAR_H
-#include "enums/gui/progresscolorid.h"
-
#include "gui/widgets/widget.h"
#include "listeners/widgetlistener.h"
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 781a52421..a95286fca 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 23b681907..1e43b31b5 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -74,8 +74,6 @@
#include "resources/image.h"
#include "resources/imagerect.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "utils/stringutils.h"
diff --git a/src/gui/widgets/selldialog.h b/src/gui/widgets/selldialog.h
index 439042a10..a9cb24870 100644
--- a/src/gui/widgets/selldialog.h
+++ b/src/gui/widgets/selldialog.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_SELLDIALOG_H
#define GUI_WIDGETS_SELLDIALOG_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index c90d2261c..fa56098d8 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -27,8 +27,6 @@
#include "gui/gui.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "utils/delete2.h"
diff --git a/src/gui/widgets/skilldata.h b/src/gui/widgets/skilldata.h
index 0317eccff..6408e8086 100644
--- a/src/gui/widgets/skilldata.h
+++ b/src/gui/widgets/skilldata.h
@@ -25,8 +25,6 @@
#include "resources/soundinfo.h"
-#include <string>
-
class Image;
struct SkillData final
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index 0778b6c12..92d753c4d 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -24,8 +24,6 @@
#include "being/playerinfo.h"
-#include "gui/theme.h"
-
#include "gui/widgets/skilldata.h"
#include "gui/models/skillmodel.h"
diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h
index 038fc2a01..9324091bf 100644
--- a/src/gui/widgets/skillinfo.h
+++ b/src/gui/widgets/skillinfo.h
@@ -26,12 +26,11 @@
#include "enums/simpletypes/modifiable.h"
#include "enums/simpletypes/visible.h"
-#include "gui/color.h"
-
#include "resources/skillowner.h"
#include "resources/skilltype.h"
#include <string>
+
#include <vector>
#include <map>
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 4adc3003f..ae08eaaef 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -68,12 +68,8 @@
#include "graphicsvertexes.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
@@ -201,7 +197,6 @@ void Slider::draw(Graphics *graphics)
int w = getWidth();
const int h = getHeight();
- int x = 0;
const int y = mHasMouse ? (h - buttons[1].grid[HSTART]->getHeight()) / 2 :
(h - buttons[0].grid[HSTART]->getHeight()) / 2;
@@ -209,6 +204,7 @@ void Slider::draw(Graphics *graphics)
if (mRedraw || graphics->getRedraw())
{
+ int x = 0;
mRedraw = false;
mVertexes->clear();
if (!mHasMouse)
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 4acc9ffd2..f96201e42 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -65,8 +65,6 @@
#include "gui/widgets/tabbedarea.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index a795e8ea1..0eb4200ad 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -57,6 +57,8 @@
#include <sys/time.h>
#endif
+#include <sstream>
+
#include "debug.h"
ChatTab *localChatTab = nullptr;
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index f7a2dcfd6..d5486c538 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -21,8 +21,6 @@
#include "gui/widgets/tabs/setup_colors.h"
-#include "enums/gui/usercolorid.h"
-
#include "gui/gui.h"
#include "gui/userpalette.h"
@@ -266,6 +264,8 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
mTextPreview->setOutline(true);
mTextPreview->useTextAlpha(false);
+// probably need combite both switches and add all mssing color ids.
+
switch (type)
{
case UserColorId::AIR_COLLISION_HIGHLIGHT:
@@ -411,7 +411,8 @@ void Setup_Colors::updateGradType()
// TRANSLATORS: color type
(grad == GradientType::RAINBOW) ? _("Rainbow") : _("Spectrum"));
- const bool enable = (grad == GradientType::STATIC || grad == GradientType::PULSE);
+ const bool enable = (grad == GradientType::STATIC ||
+ grad == GradientType::PULSE);
const bool delayEnable = true;
mGradDelayText->setEnabled(delayEnable);
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 24a385c0f..cc3b15498 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -25,8 +25,6 @@
#include "configuration.h"
-#include "enums/gui/dialogtype.h"
-
#include "input/inputactionoperators.h"
#include "input/inputmanager.h"
#include "input/keyboardconfig.h"
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 54015d788..a7a473593 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -22,8 +22,6 @@
#include "gui/widgets/tabs/setup_theme.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/gui.h"
#include "gui/themeinfo.h"
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 9acd36f86..ae587fe0e 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -24,8 +24,6 @@
#include "configuration.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windowmanager.h"
#include "gui/windows/okdialog.h"
@@ -41,8 +39,6 @@
#include "gui/widgets/slider.h"
#include "gui/widgets/dropdown.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#if defined(USE_OPENGL) && !defined(ANDROID) && !defined(__APPLE__)
@@ -54,6 +50,10 @@
#include "gui/models/modelistmodel.h"
#include "gui/models/opengllistmodel.h"
+#include "render/renderers.h"
+
+#include <sstream>
+
#include "debug.h"
extern Graphics *mainGraphics;
diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h
index b51f8bc38..5490af1a0 100644
--- a/src/gui/widgets/tabs/socialguildtab.h
+++ b/src/gui/widgets/tabs/socialguildtab.h
@@ -55,7 +55,8 @@ class SocialGuildTab final : public SocialTab,
ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
- &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
createControls(guild, showBackground);
}
diff --git a/src/gui/widgets/tabs/socialguildtab2.h b/src/gui/widgets/tabs/socialguildtab2.h
index fb3857214..ef858447d 100644
--- a/src/gui/widgets/tabs/socialguildtab2.h
+++ b/src/gui/widgets/tabs/socialguildtab2.h
@@ -50,11 +50,13 @@ class SocialGuildTab2 final : public SocialTab,
setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB),
&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE));
setHighlightedTabColor(&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED),
+ &getThemeColor(
ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
- &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
createControls(guild, showBackground);
}
diff --git a/src/gui/widgets/tabs/socialpartytab.h b/src/gui/widgets/tabs/socialpartytab.h
index ff634bf3c..dd1acf5e1 100644
--- a/src/gui/widgets/tabs/socialpartytab.h
+++ b/src/gui/widgets/tabs/socialpartytab.h
@@ -57,7 +57,8 @@ class SocialPartyTab final : public SocialTab,
ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
ThemeColorId::PARTY_SOCIAL_TAB_SELECTED),
- &getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB_SELECTED_OUTLINE));
+ &getThemeColor(
+ ThemeColorId::PARTY_SOCIAL_TAB_SELECTED_OUTLINE));
createControls(party, showBackground);
}
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index d8f58bf8d..5a4b4f5dc 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -74,8 +74,6 @@
#include "gui/widgets/label.h"
#include "gui/widgets/tabbedarea.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
@@ -111,11 +109,13 @@ Tab::Tab(const Widget2 *const widget) :
mTabHighlightedOutlineColor(&getThemeColor(
ThemeColorId::TAB_HIGHLIGHTED_OUTLINE)),
mTabSelectedColor(&getThemeColor(ThemeColorId::TAB_SELECTED)),
- mTabSelectedOutlineColor(&getThemeColor(ThemeColorId::TAB_SELECTED_OUTLINE)),
+ mTabSelectedOutlineColor(&getThemeColor(
+ ThemeColorId::TAB_SELECTED_OUTLINE)),
mFlashColor(&getThemeColor(ThemeColorId::TAB_FLASH)),
mFlashOutlineColor(&getThemeColor(ThemeColorId::TAB_FLASH_OUTLINE)),
mPlayerFlashColor(&getThemeColor(ThemeColorId::TAB_PLAYER_FLASH)),
- mPlayerFlashOutlineColor(&getThemeColor(ThemeColorId::TAB_PLAYER_FLASH_OUTLINE)),
+ mPlayerFlashOutlineColor(&getThemeColor(
+ ThemeColorId::TAB_PLAYER_FLASH_OUTLINE)),
mFlash(0),
mVertexes(new ImageCollection),
mImage(nullptr),
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 248fbcb9e..c0aacd2c6 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -65,8 +65,6 @@
#include "gui/widgets/textbox.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index f6e777e03..1ef0b3793 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -67,7 +67,6 @@
#define GUI_WIDGETS_WINDOW_H
#include "enums/simpletypes/modal.h"
-#include "enums/simpletypes/visible.h"
#include "listeners/mouselistener.h"
#include "listeners/widgetlistener.h"
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index d91526750..f5f0b1c7d 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -25,8 +25,6 @@
#include "enums/input/inputaction.h"
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/container.h"
#include "listeners/actionlistener.h"
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"