summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 15:04:01 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 15:08:24 +0300
commit07121956f882dce22235868a25e0c2df96fb828a (patch)
tree5078133e95d7b55c4811e09c9dc4f53261e62fe9
parentf57b683f8f9909ba7787c33a4953869a2ce04a5c (diff)
downloadmv-07121956f882dce22235868a25e0c2df96fb828a.tar.gz
mv-07121956f882dce22235868a25e0c2df96fb828a.tar.bz2
mv-07121956f882dce22235868a25e0c2df96fb828a.tar.xz
mv-07121956f882dce22235868a25e0c2df96fb828a.zip
Move theme colors enum into separate file.
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/being/being.cpp6
-rw-r--r--src/being/localplayer.cpp2
-rw-r--r--src/enums/gui/themecolorid.h256
-rw-r--r--src/game.cpp4
-rw-r--r--src/gui/gui.cpp4
-rw-r--r--src/gui/models/colormodel.cpp4
-rw-r--r--src/gui/popups/beingpopup.cpp36
-rw-r--r--src/gui/popups/itempopup.cpp48
-rw-r--r--src/gui/popups/skillpopup.cpp8
-rw-r--r--src/gui/popups/speechbubble.cpp8
-rw-r--r--src/gui/popups/speechbubble.h4
-rw-r--r--src/gui/popups/spellpopup.cpp8
-rw-r--r--src/gui/popups/statuspopup.cpp4
-rw-r--r--src/gui/popups/textpopup.cpp4
-rw-r--r--src/gui/theme.cpp108
-rw-r--r--src/gui/theme.h224
-rw-r--r--src/gui/widgets/avatarlistbox.cpp4
-rw-r--r--src/gui/widgets/browserbox.cpp14
-rw-r--r--src/gui/widgets/button.cpp80
-rw-r--r--src/gui/widgets/checkbox.cpp4
-rw-r--r--src/gui/widgets/desktop.cpp4
-rw-r--r--src/gui/widgets/dropdown.cpp14
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/guitable.cpp4
-rw-r--r--src/gui/widgets/itemcontainer.cpp8
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp20
-rw-r--r--src/gui/widgets/label.cpp4
-rw-r--r--src/gui/widgets/listbox.cpp10
-rw-r--r--src/gui/widgets/progressbar.cpp4
-rw-r--r--src/gui/widgets/radiobutton.cpp4
-rw-r--r--src/gui/widgets/serverslistbox.h6
-rw-r--r--src/gui/widgets/shoplistbox.cpp16
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/skilllistbox.h8
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/tabs/chat/battletab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/channeltab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/emulateguildtab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/gmtab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/guildtab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/partytab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/whispertab.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp2
-rw-r--r--src/gui/widgets/tabs/socialguildtab.h12
-rw-r--r--src/gui/widgets/tabs/socialguildtab2.h12
-rw-r--r--src/gui/widgets/tabs/socialpartytab.h12
-rw-r--r--src/gui/widgets/tabs/tab.cpp20
-rw-r--r--src/gui/widgets/textbox.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp6
-rw-r--r--src/gui/widgets/textpreview.cpp8
-rw-r--r--src/gui/widgets/virtshortcutcontainer.cpp16
-rw-r--r--src/gui/widgets/widget2.h6
-rw-r--r--src/gui/widgets/window.cpp4
-rw-r--r--src/gui/windows/equipmentwindow.cpp8
-rw-r--r--src/gui/windows/inventorywindow.cpp12
-rw-r--r--src/gui/windows/ministatuswindow.cpp18
-rw-r--r--src/gui/windows/outfitwindow.cpp4
-rw-r--r--src/gui/windows/statuswindow.cpp32
-rw-r--r--src/gui/windows/tradewindow.cpp16
-rw-r--r--src/particle/textparticle.cpp4
-rw-r--r--src/text.cpp4
-rw-r--r--src/touchmanager.cpp6
64 files changed, 605 insertions, 561 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0ea642998..124ed3d7b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1127,6 +1127,7 @@ SET(SRCS
gui/color.h
gui/colorpair.h
enums/gui/dialogtype.h
+ enums/gui/themecolorid.h
listeners/errorlistener.cpp
listeners/errorlistener.h
listeners/widgetdeathlistener.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 4c6612e63..07e8bcd28 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -192,6 +192,7 @@ manaplus_SOURCES += events/actionevent.h \
gui/cliprect.h \
gui/color.h \
enums/gui/dialogtype.h \
+ enums/gui/themecolorid.h \
listeners/errorlistener.cpp \
listeners/errorlistener.h \
listeners/widgetdeathlistener.h \
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 95d7330ed..121564ccc 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1882,7 +1882,7 @@ void Being::drawSpeech(const int offsetX, const int offsetY)
getPixelX(),
getPixelY() - getHeight(),
Graphics::CENTER,
- &theme->getColor(Theme::BUBBLE_TEXT, 255),
+ &theme->getColor(ThemeColorId::BUBBLE_TEXT, 255),
Speech_true);
}
}
@@ -2073,11 +2073,11 @@ void Being::updateColors()
else if (this == localPlayer)
{
mNameColor = &userPalette->getColor(UserPalette::SELF);
- mTextColor = &theme->getColor(Theme::PLAYER, 255);
+ mTextColor = &theme->getColor(ThemeColorId::PLAYER, 255);
}
else
{
- mTextColor = &theme->getColor(Theme::PLAYER, 255);
+ mTextColor = &theme->getColor(ThemeColorId::PLAYER, 255);
if (player_relations.getRelation(mName) != PlayerRelation::ERASED)
mErased = false;
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index e9fa6e2c4..6251cc5e5 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -183,7 +183,7 @@ LocalPlayer::LocalPlayer(const BeingId id,
mAttackRange = 0;
mLevel = 1;
mAdvanced = true;
- mTextColor = &theme->getColor(Theme::PLAYER, 255);
+ mTextColor = &theme->getColor(ThemeColorId::PLAYER, 255);
if (userPalette)
mNameColor = &userPalette->getColor(UserPalette::SELF);
else
diff --git a/src/enums/gui/themecolorid.h b/src/enums/gui/themecolorid.h
new file mode 100644
index 000000000..3c4724c05
--- /dev/null
+++ b/src/enums/gui/themecolorid.h
@@ -0,0 +1,256 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2008 The Legend of Mazzeroth Development Team
+ * Copyright (C) 2009 Aethyra Development Team
+ * Copyright (C) 2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GUI_THEMECOLORID_H
+#define GUI_THEMECOLORID_H
+
+namespace ThemeColorId
+{
+ enum T
+ {
+ BROWSERBOX = 0,
+ BROWSERBOX_OUTLINE,
+ SELFNICK,
+ SELFNICK_OUTLINE,
+ TEXT,
+ TEXT_OUTLINE,
+ CARET,
+ SHADOW,
+ OUTLINE,
+ BORDER,
+ PROGRESS_BAR,
+ PROGRESS_BAR_OUTLINE,
+ BUTTON,
+ BUTTON_OUTLINE,
+ BUTTON_DISABLED,
+ BUTTON_DISABLED_OUTLINE,
+ BUTTON_HIGHLIGHTED,
+ BUTTON_HIGHLIGHTED_OUTLINE,
+ BUTTON_PRESSED,
+ BUTTON_PRESSED_OUTLINE,
+ CHECKBOX,
+ CHECKBOX_OUTLINE,
+ DROPDOWN,
+ DROPDOWN_OUTLINE,
+ LABEL,
+ LABEL_OUTLINE,
+ LISTBOX,
+ LISTBOX_OUTLINE,
+ LISTBOX_SELECTED,
+ LISTBOX_SELECTED_OUTLINE,
+ RADIOBUTTON,
+ RADIOBUTTON_OUTLINE,
+ POPUP,
+ POPUP_OUTLINE,
+ TAB,
+ TAB_OUTLINE,
+ TAB_HIGHLIGHTED,
+ TAB_HIGHLIGHTED_OUTLINE,
+ TAB_SELECTED,
+ TAB_SELECTED_OUTLINE,
+ TEXTBOX,
+ TEXTFIELD,
+ TEXTFIELD_OUTLINE,
+ WINDOW,
+ WINDOW_OUTLINE,
+ BATTLE_CHAT_TAB,
+ BATTLE_CHAT_TAB_OUTLINE,
+ CHANNEL_CHAT_TAB,
+ CHANNEL_CHAT_TAB_OUTLINE,
+ PARTY_CHAT_TAB,
+ PARTY_CHAT_TAB_OUTLINE,
+ PARTY_SOCIAL_TAB,
+ PARTY_SOCIAL_TAB_OUTLINE,
+ GUILD_CHAT_TAB,
+ GUILD_CHAT_TAB_OUTLINE,
+ GUILD_SOCIAL_TAB,
+ GUILD_SOCIAL_TAB_OUTLINE,
+ GM_CHAT_TAB,
+ GM_CHAT_TAB_OUTLINE,
+ BATTLE_CHAT_TAB_HIGHLIGHTED,
+ BATTLE_CHAT_TAB_HIGHLIGHTED_OUTLINE,
+ CHANNEL_CHAT_TAB_HIGHLIGHTED,
+ CHANNEL_CHAT_TAB_HIGHLIGHTED_OUTLINE,
+ PARTY_CHAT_TAB_HIGHLIGHTED,
+ PARTY_CHAT_TAB_HIGHLIGHTED_OUTLINE,
+ PARTY_SOCIAL_TAB_HIGHLIGHTED,
+ PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE,
+ GUILD_CHAT_TAB_HIGHLIGHTED,
+ GUILD_CHAT_TAB_HIGHLIGHTED_OUTLINE,
+ GUILD_SOCIAL_TAB_HIGHLIGHTED,
+ GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE,
+ GM_CHAT_TAB_HIGHLIGHTED,
+ GM_CHAT_TAB_HIGHLIGHTED_OUTLINE,
+ BATTLE_CHAT_TAB_SELECTED,
+ BATTLE_CHAT_TAB_SELECTED_OUTLINE,
+ CHANNEL_CHAT_TAB_SELECTED,
+ CHANNEL_CHAT_TAB_SELECTED_OUTLINE,
+ PARTY_CHAT_TAB_SELECTED,
+ PARTY_CHAT_TAB_SELECTED_OUTLINE,
+ PARTY_SOCIAL_TAB_SELECTED,
+ PARTY_SOCIAL_TAB_SELECTED_OUTLINE,
+ GUILD_CHAT_TAB_SELECTED,
+ GUILD_CHAT_TAB_SELECTED_OUTLINE,
+ GUILD_SOCIAL_TAB_SELECTED,
+ GUILD_SOCIAL_TAB_SELECTED_OUTLINE,
+ GM_CHAT_TAB_SELECTED,
+ GM_CHAT_TAB_SELECTED_OUTLINE,
+ BACKGROUND,
+ BACKGROUND_GRAY,
+ SCROLLBAR_GRAY,
+ DROPDOWN_SHADOW,
+ HIGHLIGHT,
+ HIGHLIGHT_OUTLINE,
+ TAB_FLASH,
+ TAB_FLASH_OUTLINE,
+ TAB_PLAYER_FLASH,
+ TAB_PLAYER_FLASH_OUTLINE,
+ SHOP_WARNING,
+ ITEM_EQUIPPED,
+ ITEM_EQUIPPED_OUTLINE,
+ ITEM_NOT_EQUIPPED,
+ ITEM_NOT_EQUIPPED_OUTLINE,
+ CHAT,
+ CHAT_OUTLINE,
+ GM,
+ GM_OUTLINE,
+ GLOBAL,
+ GLOBAL_OUTLINE,
+ PLAYER,
+ PLAYER_OUTLINE,
+ WHISPER_TAB,
+ WHISPER_TAB_OUTLINE,
+ WHISPER_TAB_OFFLINE,
+ WHISPER_TAB_OFFLINE_OUTLINE,
+ WHISPER_TAB_HIGHLIGHTED,
+ WHISPER_TAB_HIGHLIGHTED_OUTLINE,
+ WHISPER_TAB_OFFLINE_HIGHLIGHTED,
+ WHISPER_TAB_OFFLINE_HIGHLIGHTED_OUTLINE,
+ WHISPER_TAB_SELECTED,
+ WHISPER_TAB_SELECTED_OUTLINE,
+ WHISPER_TAB_OFFLINE_SELECTED,
+ WHISPER_TAB_OFFLINE_SELECTED_OUTLINE,
+ IS,
+ IS_OUTLINE,
+ SERVER,
+ SERVER_OUTLINE,
+ LOGGER,
+ LOGGER_OUTLINE,
+ HYPERLINK,
+ HYPERLINK_OUTLINE,
+ UNKNOWN_ITEM,
+ UNKNOWN_ITEM_OUTLINE,
+ GENERIC,
+ GENERIC_OUTLINE,
+ HEAD,
+ HEAD_OUTLINE,
+ USABLE,
+ USABLE_OUTLINE,
+ TORSO,
+ TORSO_OUTLINE,
+ ONEHAND,
+ ONEHAND_OUTLINE,
+ LEGS,
+ LEGS_OUTLINE,
+ FEET,
+ FEET_OUTLINE,
+ TWOHAND,
+ TWOHAND_OUTLINE,
+ SHIELD,
+ SHIELD_OUTLINE,
+ RING,
+ RING_OUTLINE,
+ NECKLACE,
+ NECKLACE_OUTLINE,
+ ARMS,
+ ARMS_OUTLINE,
+ AMMO,
+ AMMO_OUTLINE,
+ SERVER_VERSION_NOT_SUPPORTED,
+ SERVER_VERSION_NOT_SUPPORTED_OUTLINE,
+ WARNING,
+ WARNING_OUTLINE,
+ CHARM,
+ CHARM_OUTLINE,
+ PLAYER_ADVANCED,
+ PLAYER_ADVANCED_OUTLINE,
+ BUBBLE_NAME,
+ BUBBLE_NAME_OUTLINE,
+ BUBBLE_TEXT,
+ BUBBLE_TEXT_OUTLINE,
+ BLACK,
+ BLACK_OUTLINE,
+ RED,
+ RED_OUTLINE,
+ GREEN,
+ GREEN_OUTLINE,
+ BLUE,
+ BLUE_OUTLINE,
+ ORANGE,
+ ORANGE_OUTLINE,
+ YELLOW,
+ YELLOW_OUTLINE,
+ PINK,
+ PINK_OUTLINE,
+ PURPLE,
+ PURPLE_OUTLINE,
+ GRAY,
+ GRAY_OUTLINE,
+ BROWN,
+ BROWN_OUTLINE,
+ STATUSBAR_ON,
+ STATUSBAR_OFF,
+ TABLE_BACKGROUND,
+ SLOTS_BAR,
+ SLOTS_BAR_OUTLINE,
+ HP_BAR,
+ HP_BAR_OUTLINE,
+ MP_BAR,
+ MP_BAR_OUTLINE,
+ NO_MP_BAR,
+ NO_MP_BAR_OUTLINE,
+ XP_BAR,
+ XP_BAR_OUTLINE,
+ WEIGHT_BAR,
+ WEIGHT_BAR_OUTLINE,
+ MONEY_BAR,
+ MONEY_BAR_OUTLINE,
+ ARROWS_BAR,
+ ARROWS_BAR_OUTLINE,
+ STATUS_BAR,
+ STATUS_BAR_OUTLINE,
+ JOB_BAR,
+ JOB_BAR_OUTLINE,
+ OLDCHAT,
+ OLDCHAT_OUTLINE,
+ AWAYCHAT,
+ AWAYCHAT_OUTLINE,
+ SKILL_COOLDOWN,
+ TEXT_DISABLED,
+ TEXT_DISABLED_OUTLINE,
+ THEME_COLORS_END
+ };
+} // namespace ThemeColorId
+
+#endif // GUI_THEMECOLORID_H
diff --git a/src/game.cpp b/src/game.cpp
index 12706cdf1..88d38f1a4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -491,8 +491,8 @@ void Game::addWatermark()
if (!boldFont || !config.getBoolValue("addwatermark"))
return;
- const Color &color1 = theme->getColor(Theme::TEXT, 255);
- const Color &color2 = theme->getColor(Theme::TEXT_OUTLINE, 255);
+ const Color &color1 = theme->getColor(ThemeColorId::TEXT, 255);
+ const Color &color2 = theme->getColor(ThemeColorId::TEXT_OUTLINE, 255);
boldFont->drawString(mainGraphics,
color1,
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index f00821c60..f978fc091 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -131,8 +131,8 @@ Gui::Gui() :
mLastMouseRealY(0),
#endif
mFocusListeners(),
- mForegroundColor(theme->getColor(Theme::TEXT, 255)),
- mForegroundColor2(theme->getColor(Theme::TEXT_OUTLINE, 255)),
+ mForegroundColor(theme->getColor(ThemeColorId::TEXT, 255)),
+ mForegroundColor2(theme->getColor(ThemeColorId::TEXT_OUTLINE, 255)),
mTime(0),
mCustomCursor(false),
mDoubleClick(true)
diff --git a/src/gui/models/colormodel.cpp b/src/gui/models/colormodel.cpp
index 2d0b65788..212ed5227 100644
--- a/src/gui/models/colormodel.cpp
+++ b/src/gui/models/colormodel.cpp
@@ -64,8 +64,8 @@ void ColorModel::add(const std::string &name, const Color *const color1,
}
#define addColor(name, color) \
- model->add(name, &widget->getThemeColor(Theme::color), \
- &widget->getThemeColor(Theme::color##_OUTLINE));
+ model->add(name, &widget->getThemeColor(ThemeColorId::color), \
+ &widget->getThemeColor(ThemeColorId::color##_OUTLINE));
ColorModel *ColorModel::createDefault(const Widget2 *const widget)
{
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 8cacafefb..d1f7b1e17 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -70,20 +70,20 @@ BeingPopup::BeingPopup() :
mBeingComment->setPosition(0, 5 * fontHeight);
mBeingRoom->setPosition(0, 6 * fontHeight);
- mBeingParty->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mBeingGuild->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mBeingRank->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mBeingBuyBoard->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mBeingSellBoard->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mBeingComment->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mBeingRoom->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mBeingParty->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingGuild->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingRank->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingBuyBoard->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingSellBoard->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingComment->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingRoom->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
}
BeingPopup::~BeingPopup()
@@ -138,13 +138,13 @@ void BeingPopup::show(const int x, const int y, Being *const b)
if (b->isAdvanced())
{
mBeingName->setForegroundColorAll(getThemeColor(
- Theme::PLAYER_ADVANCED), getThemeColor(
- Theme::PLAYER_ADVANCED_OUTLINE));
+ ThemeColorId::PLAYER_ADVANCED), getThemeColor(
+ ThemeColorId::PLAYER_ADVANCED_OUTLINE));
}
else
{
- mBeingName->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mBeingName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
}
mBeingName->adjustSize();
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 705c7c50f..5ae6830cc 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -68,20 +68,20 @@ ItemPopup::ItemPopup() :
// Item Description
mItemDesc->setEditable(false);
mItemDesc->setPosition(0, fontHeight);
- mItemDesc->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mItemDesc->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
// Item Effect
mItemEffect->setEditable(false);
mItemEffect->setPosition(0, 2 * fontHeight);
- mItemEffect->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mItemEffect->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
// Item Weight
mItemWeight->setEditable(false);
mItemWeight->setPosition(0, 3 * fontHeight);
- mItemWeight->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mItemWeight->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
}
void ItemPopup::postInit()
@@ -247,27 +247,27 @@ void ItemPopup::setLabelColor(Label *label, const ItemType::Type type) const
{
switch (type)
{
- caseSetColor(ItemType::UNUSABLE, Theme::GENERIC)
- caseSetColor(ItemType::USABLE, Theme::USABLE)
- caseSetColor(ItemType::EQUIPMENT_ONE_HAND_WEAPON, Theme::ONEHAND)
- caseSetColor(ItemType::EQUIPMENT_TWO_HANDS_WEAPON, Theme::TWOHAND)
- caseSetColor(ItemType::EQUIPMENT_TORSO, Theme::TORSO)
- caseSetColor(ItemType::EQUIPMENT_ARMS, Theme::ARMS)
- caseSetColor(ItemType::EQUIPMENT_HEAD, Theme::HEAD)
- caseSetColor(ItemType::EQUIPMENT_LEGS, Theme::LEGS)
- caseSetColor(ItemType::EQUIPMENT_SHIELD, Theme::SHIELD)
- caseSetColor(ItemType::EQUIPMENT_RING, Theme::RING)
- caseSetColor(ItemType::EQUIPMENT_NECKLACE, Theme::NECKLACE)
- caseSetColor(ItemType::EQUIPMENT_FEET, Theme::FEET)
- caseSetColor(ItemType::EQUIPMENT_AMMO, Theme::AMMO)
- caseSetColor(ItemType::EQUIPMENT_CHARM, Theme::CHARM)
- caseSetColor(ItemType::SPRITE_RACE, Theme::UNKNOWN_ITEM)
- caseSetColor(ItemType::SPRITE_HAIR, Theme::UNKNOWN_ITEM)
+ 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_TORSO, ThemeColorId::TORSO)
+ caseSetColor(ItemType::EQUIPMENT_ARMS, ThemeColorId::ARMS)
+ caseSetColor(ItemType::EQUIPMENT_HEAD, ThemeColorId::HEAD)
+ caseSetColor(ItemType::EQUIPMENT_LEGS, ThemeColorId::LEGS)
+ caseSetColor(ItemType::EQUIPMENT_SHIELD, ThemeColorId::SHIELD)
+ caseSetColor(ItemType::EQUIPMENT_RING, ThemeColorId::RING)
+ caseSetColor(ItemType::EQUIPMENT_NECKLACE, ThemeColorId::NECKLACE)
+ caseSetColor(ItemType::EQUIPMENT_FEET, ThemeColorId::FEET)
+ caseSetColor(ItemType::EQUIPMENT_AMMO, ThemeColorId::AMMO)
+ caseSetColor(ItemType::EQUIPMENT_CHARM, ThemeColorId::CHARM)
+ caseSetColor(ItemType::SPRITE_RACE, ThemeColorId::UNKNOWN_ITEM)
+ caseSetColor(ItemType::SPRITE_HAIR, ThemeColorId::UNKNOWN_ITEM)
default:
{
return label->setForegroundColorAll(getThemeColor(
- Theme::UNKNOWN_ITEM), getThemeColor(
- Theme::UNKNOWN_ITEM_OUTLINE));
+ ThemeColorId::UNKNOWN_ITEM), getThemeColor(
+ ThemeColorId::UNKNOWN_ITEM_OUTLINE));
}
}
}
diff --git a/src/gui/popups/skillpopup.cpp b/src/gui/popups/skillpopup.cpp
index ecd085a99..a3da22acd 100644
--- a/src/gui/popups/skillpopup.cpp
+++ b/src/gui/popups/skillpopup.cpp
@@ -50,13 +50,13 @@ SkillPopup::SkillPopup() :
mSkillDesc->setEditable(false);
mSkillDesc->setPosition(0, fontHeight);
- mSkillDesc->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mSkillDesc->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
mSkillEffect->setEditable(false);
mSkillEffect->setPosition(0, 2 * fontHeight);
- mSkillEffect->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mSkillEffect->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
}
void SkillPopup::postInit()
diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp
index c91b41370..650afc805 100644
--- a/src/gui/popups/speechbubble.cpp
+++ b/src/gui/popups/speechbubble.cpp
@@ -48,8 +48,8 @@ SpeechBubble::SpeechBubble() :
mCaption->setFont(boldFont);
mSpeechBox->setOpaque(false);
- mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT),
- getThemeColor(Theme::BUBBLE_TEXT_OUTLINE));
+ mSpeechBox->setForegroundColorAll(getThemeColor(ThemeColorId::BUBBLE_TEXT),
+ getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE));
}
void SpeechBubble::postInit()
@@ -73,8 +73,8 @@ void SpeechBubble::setText(const std::string &text, const bool showName)
if (text == mText && (mCaption->getWidth() <= mSpeechBox->getWidth()))
return;
- mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT),
- getThemeColor(Theme::BUBBLE_TEXT_OUTLINE));
+ mSpeechBox->setForegroundColorAll(getThemeColor(ThemeColorId::BUBBLE_TEXT),
+ getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE));
int width = mCaption->getWidth();
mSpeechBox->clearRows();
diff --git a/src/gui/popups/speechbubble.h b/src/gui/popups/speechbubble.h
index 4d6d86aed..7f09ca187 100644
--- a/src/gui/popups/speechbubble.h
+++ b/src/gui/popups/speechbubble.h
@@ -46,9 +46,9 @@ class SpeechBubble final : public Popup
*/
void setCaption(const std::string &name,
const Color *const color1 =
- &theme->getColor(Theme::BUBBLE_NAME, 255),
+ &theme->getColor(ThemeColorId::BUBBLE_NAME, 255),
const Color *const color2 =
- &theme->getColor(Theme::BUBBLE_NAME_OUTLINE, 255));
+ &theme->getColor(ThemeColorId::BUBBLE_NAME_OUTLINE, 255));
/**
* Sets the text to be displayed.
diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp
index be741bb32..f9da0482a 100644
--- a/src/gui/popups/spellpopup.cpp
+++ b/src/gui/popups/spellpopup.cpp
@@ -39,10 +39,10 @@ SpellPopup::SpellPopup() :
mItemComment(new Label(this))
{
mItemName->setFont(boldFont);
- mItemName->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
- mItemComment->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ mItemName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemComment->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
}
void SpellPopup::postInit()
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index f69d72574..2bc4a9170 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -39,8 +39,8 @@
{ \
Label *const label = mLabels[num]; \
label->setPosition(0, y); \
- label->setForegroundColorAll(getThemeColor(Theme::POPUP), \
- getThemeColor(Theme::POPUP_OUTLINE)); \
+ label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), \
+ getThemeColor(ThemeColorId::POPUP_OUTLINE)); \
add(label); \
y += fontHeight; \
}
diff --git a/src/gui/popups/textpopup.cpp b/src/gui/popups/textpopup.cpp
index 511816586..b6cb996a6 100644
--- a/src/gui/popups/textpopup.cpp
+++ b/src/gui/popups/textpopup.cpp
@@ -47,8 +47,8 @@ void TextPopup::postInit()
Label *const label = new Label(this);
mText[f] = label;
label->setPosition(0, y);
- label->setForegroundColorAll(getThemeColor(Theme::POPUP),
- getThemeColor(Theme::POPUP_OUTLINE));
+ label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE));
add(label);
y += fontHeight;
}
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 844341e3f..ab6255a68 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -27,6 +27,8 @@
#include "configuration.h"
#include "graphicsmanager.h"
+#include "enums/gui/themecolorid.h"
+
#include "gui/skin.h"
#include "gui/themeinfo.h"
@@ -67,7 +69,7 @@ static void initDefaultThemePath()
}
Theme::Theme() :
- Palette(THEME_COLORS_END * THEME_PALETTES),
+ Palette(ThemeColorId::THEME_COLORS_END * THEME_PALETTES),
mSkins(),
mMinimumOpacity(-1.0F),
mProgressColors(ProgressColors(THEME_PROG_END))
@@ -76,56 +78,56 @@ Theme::Theme() :
config.addListener("guialpha", this);
- mColors[HIGHLIGHT].ch = 'H';
- mColors[CHAT].ch = 'C';
- mColors[GM].ch = 'G';
- mColors[GLOBAL].ch = 'g';
- mColors[PLAYER].ch = 'Y';
- mColors[WHISPER_TAB].ch = 'W';
- mColors[WHISPER_TAB_OFFLINE].ch = 'w';
- mColors[IS].ch = 'I';
- mColors[PARTY_CHAT_TAB].ch = 'P';
- mColors[GUILD_CHAT_TAB].ch = 'U';
- mColors[SERVER].ch = 'S';
- mColors[LOGGER].ch = 'L';
- mColors[HYPERLINK].ch = '<';
- mColors[SELFNICK].ch = 's';
- mColors[OLDCHAT].ch = 'o';
- mColors[AWAYCHAT].ch = 'a';
- mCharColors['H'] = HIGHLIGHT;
- mCharColors['C'] = CHAT;
- mCharColors['G'] = GM;
- mCharColors['g'] = GLOBAL;
- mCharColors['Y'] = PLAYER;
- mCharColors['W'] = WHISPER_TAB;
- mCharColors['w'] = WHISPER_TAB_OFFLINE;
- mCharColors['I'] = IS;
- mCharColors['P'] = PARTY_CHAT_TAB;
- mCharColors['U'] = GUILD_CHAT_TAB;
- mCharColors['S'] = SERVER;
- mCharColors['L'] = LOGGER;
- mCharColors['<'] = HYPERLINK;
- mCharColors['s'] = SELFNICK;
- mCharColors['o'] = OLDCHAT;
- mCharColors['a'] = AWAYCHAT;
+ mColors[ThemeColorId::HIGHLIGHT].ch = 'H';
+ mColors[ThemeColorId::CHAT].ch = 'C';
+ mColors[ThemeColorId::GM].ch = 'G';
+ mColors[ThemeColorId::GLOBAL].ch = 'g';
+ mColors[ThemeColorId::PLAYER].ch = 'Y';
+ mColors[ThemeColorId::WHISPER_TAB].ch = 'W';
+ mColors[ThemeColorId::WHISPER_TAB_OFFLINE].ch = 'w';
+ mColors[ThemeColorId::IS].ch = 'I';
+ mColors[ThemeColorId::PARTY_CHAT_TAB].ch = 'P';
+ mColors[ThemeColorId::GUILD_CHAT_TAB].ch = 'U';
+ mColors[ThemeColorId::SERVER].ch = 'S';
+ mColors[ThemeColorId::LOGGER].ch = 'L';
+ mColors[ThemeColorId::HYPERLINK].ch = '<';
+ mColors[ThemeColorId::SELFNICK].ch = 's';
+ mColors[ThemeColorId::OLDCHAT].ch = 'o';
+ mColors[ThemeColorId::AWAYCHAT].ch = 'a';
+ mCharColors['H'] = ThemeColorId::HIGHLIGHT;
+ mCharColors['C'] = ThemeColorId::CHAT;
+ mCharColors['G'] = ThemeColorId::GM;
+ mCharColors['g'] = ThemeColorId::GLOBAL;
+ mCharColors['Y'] = ThemeColorId::PLAYER;
+ mCharColors['W'] = ThemeColorId::WHISPER_TAB;
+ mCharColors['w'] = ThemeColorId::WHISPER_TAB_OFFLINE;
+ mCharColors['I'] = ThemeColorId::IS;
+ mCharColors['P'] = ThemeColorId::PARTY_CHAT_TAB;
+ mCharColors['U'] = ThemeColorId::GUILD_CHAT_TAB;
+ mCharColors['S'] = ThemeColorId::SERVER;
+ mCharColors['L'] = ThemeColorId::LOGGER;
+ mCharColors['<'] = ThemeColorId::HYPERLINK;
+ mCharColors['s'] = ThemeColorId::SELFNICK;
+ mCharColors['o'] = ThemeColorId::OLDCHAT;
+ mCharColors['a'] = ThemeColorId::AWAYCHAT;
// here need use outlined colors
- mCharColors['H' | 0x80] = HIGHLIGHT_OUTLINE;
- mCharColors['C' | 0x80] = CHAT_OUTLINE;
- mCharColors['G' | 0x80] = GM_OUTLINE;
- mCharColors['g' | 0x80] = GLOBAL_OUTLINE;
- mCharColors['Y' | 0x80] = PLAYER_OUTLINE;
- mCharColors['W' | 0x80] = WHISPER_TAB_OUTLINE;
- mCharColors['w' | 0x80] = WHISPER_TAB_OFFLINE_OUTLINE;
- mCharColors['I' | 0x80] = IS_OUTLINE;
- mCharColors['P' | 0x80] = PARTY_CHAT_TAB_OUTLINE;
- mCharColors['U' | 0x80] = GUILD_CHAT_TAB_OUTLINE;
- mCharColors['S' | 0x80] = SERVER_OUTLINE;
- mCharColors['L' | 0x80] = LOGGER_OUTLINE;
- mCharColors['<' | 0x80] = HYPERLINK_OUTLINE;
- mCharColors['s' | 0x80] = SELFNICK_OUTLINE;
- mCharColors['o' | 0x80] = OLDCHAT_OUTLINE;
- mCharColors['a' | 0x80] = AWAYCHAT_OUTLINE;
+ mCharColors['H' | 0x80] = ThemeColorId::HIGHLIGHT_OUTLINE;
+ mCharColors['C' | 0x80] = ThemeColorId::CHAT_OUTLINE;
+ mCharColors['G' | 0x80] = ThemeColorId::GM_OUTLINE;
+ mCharColors['g' | 0x80] = ThemeColorId::GLOBAL_OUTLINE;
+ mCharColors['Y' | 0x80] = ThemeColorId::PLAYER_OUTLINE;
+ mCharColors['W' | 0x80] = ThemeColorId::WHISPER_TAB_OUTLINE;
+ mCharColors['w' | 0x80] = ThemeColorId::WHISPER_TAB_OFFLINE_OUTLINE;
+ mCharColors['I' | 0x80] = ThemeColorId::IS_OUTLINE;
+ mCharColors['P' | 0x80] = ThemeColorId::PARTY_CHAT_TAB_OUTLINE;
+ mCharColors['U' | 0x80] = ThemeColorId::GUILD_CHAT_TAB_OUTLINE;
+ mCharColors['S' | 0x80] = ThemeColorId::SERVER_OUTLINE;
+ mCharColors['L' | 0x80] = ThemeColorId::LOGGER_OUTLINE;
+ mCharColors['<' | 0x80] = ThemeColorId::HYPERLINK_OUTLINE;
+ mCharColors['s' | 0x80] = ThemeColorId::SELFNICK_OUTLINE;
+ mCharColors['o' | 0x80] = ThemeColorId::OLDCHAT_OUTLINE;
+ mCharColors['a' | 0x80] = ThemeColorId::AWAYCHAT_OUTLINE;
}
Theme::~Theme()
@@ -633,7 +635,7 @@ ImageSet *Theme::getImageSetFromTheme(const std::string &path,
static int readColorType(const std::string &type)
{
- static const std::string colors[Theme::THEME_COLORS_END] =
+ static const std::string colors[ThemeColorId::THEME_COLORS_END] =
{
"BROWSERBOX",
"BROWSERBOX_OUTLINE",
@@ -860,7 +862,7 @@ static int readColorType(const std::string &type)
if (type.empty())
return -1;
- for (int i = 0; i < Theme::THEME_COLORS_END; i++)
+ for (int i = 0; i < ThemeColorId::THEME_COLORS_END; i++)
{
if (compareStrI(type, colors[i]) == 0)
return i;
@@ -1017,7 +1019,7 @@ void Theme::loadColors(std::string file)
const Color color = readColor(temp);
const GradientType grad = readColorGradient(
XML::getProperty(node, "effect", ""));
- mColors[paletteId * THEME_COLORS_END + type].set(
+ mColors[paletteId * ThemeColorId::THEME_COLORS_END + type].set(
type, color, grad, 10);
if (!findLast(id, "_OUTLINE"))
@@ -1025,7 +1027,7 @@ void Theme::loadColors(std::string file)
const int type2 = readColorType(id + "_OUTLINE");
if (type2 < 0)
continue;
- const int idx = paletteId * THEME_COLORS_END;
+ const int idx = paletteId * ThemeColorId::THEME_COLORS_END;
mColors[idx + type2] = mColors[idx + type];
}
}
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 7bb1006b3..8d439bd0a 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -90,230 +90,6 @@ class Theme final : public Palette,
const std::string &name2,
const int w,
const int h)A_WARN_UNUSED;
- enum ThemePalette
- {
- BROWSERBOX = 0,
- BROWSERBOX_OUTLINE,
- SELFNICK,
- SELFNICK_OUTLINE,
- TEXT,
- TEXT_OUTLINE,
- CARET,
- SHADOW,
- OUTLINE,
- BORDER,
- PROGRESS_BAR,
- PROGRESS_BAR_OUTLINE,
- BUTTON,
- BUTTON_OUTLINE,
- BUTTON_DISABLED,
- BUTTON_DISABLED_OUTLINE,
- BUTTON_HIGHLIGHTED,
- BUTTON_HIGHLIGHTED_OUTLINE,
- BUTTON_PRESSED,
- BUTTON_PRESSED_OUTLINE,
- CHECKBOX,
- CHECKBOX_OUTLINE,
- DROPDOWN,
- DROPDOWN_OUTLINE,
- LABEL,
- LABEL_OUTLINE,
- LISTBOX,
- LISTBOX_OUTLINE,
- LISTBOX_SELECTED,
- LISTBOX_SELECTED_OUTLINE,
- RADIOBUTTON,
- RADIOBUTTON_OUTLINE,
- POPUP,
- POPUP_OUTLINE,
- TAB,
- TAB_OUTLINE,
- TAB_HIGHLIGHTED,
- TAB_HIGHLIGHTED_OUTLINE,
- TAB_SELECTED,
- TAB_SELECTED_OUTLINE,
- TEXTBOX,
- TEXTFIELD,
- TEXTFIELD_OUTLINE,
- WINDOW,
- WINDOW_OUTLINE,
- BATTLE_CHAT_TAB,
- BATTLE_CHAT_TAB_OUTLINE,
- CHANNEL_CHAT_TAB,
- CHANNEL_CHAT_TAB_OUTLINE,
- PARTY_CHAT_TAB,
- PARTY_CHAT_TAB_OUTLINE,
- PARTY_SOCIAL_TAB,
- PARTY_SOCIAL_TAB_OUTLINE,
- GUILD_CHAT_TAB,
- GUILD_CHAT_TAB_OUTLINE,
- GUILD_SOCIAL_TAB,
- GUILD_SOCIAL_TAB_OUTLINE,
- GM_CHAT_TAB,
- GM_CHAT_TAB_OUTLINE,
- BATTLE_CHAT_TAB_HIGHLIGHTED,
- BATTLE_CHAT_TAB_HIGHLIGHTED_OUTLINE,
- CHANNEL_CHAT_TAB_HIGHLIGHTED,
- CHANNEL_CHAT_TAB_HIGHLIGHTED_OUTLINE,
- PARTY_CHAT_TAB_HIGHLIGHTED,
- PARTY_CHAT_TAB_HIGHLIGHTED_OUTLINE,
- PARTY_SOCIAL_TAB_HIGHLIGHTED,
- PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE,
- GUILD_CHAT_TAB_HIGHLIGHTED,
- GUILD_CHAT_TAB_HIGHLIGHTED_OUTLINE,
- GUILD_SOCIAL_TAB_HIGHLIGHTED,
- GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE,
- GM_CHAT_TAB_HIGHLIGHTED,
- GM_CHAT_TAB_HIGHLIGHTED_OUTLINE,
- BATTLE_CHAT_TAB_SELECTED,
- BATTLE_CHAT_TAB_SELECTED_OUTLINE,
- CHANNEL_CHAT_TAB_SELECTED,
- CHANNEL_CHAT_TAB_SELECTED_OUTLINE,
- PARTY_CHAT_TAB_SELECTED,
- PARTY_CHAT_TAB_SELECTED_OUTLINE,
- PARTY_SOCIAL_TAB_SELECTED,
- PARTY_SOCIAL_TAB_SELECTED_OUTLINE,
- GUILD_CHAT_TAB_SELECTED,
- GUILD_CHAT_TAB_SELECTED_OUTLINE,
- GUILD_SOCIAL_TAB_SELECTED,
- GUILD_SOCIAL_TAB_SELECTED_OUTLINE,
- GM_CHAT_TAB_SELECTED,
- GM_CHAT_TAB_SELECTED_OUTLINE,
- BACKGROUND,
- BACKGROUND_GRAY,
- SCROLLBAR_GRAY,
- DROPDOWN_SHADOW,
- HIGHLIGHT,
- HIGHLIGHT_OUTLINE,
- TAB_FLASH,
- TAB_FLASH_OUTLINE,
- TAB_PLAYER_FLASH,
- TAB_PLAYER_FLASH_OUTLINE,
- SHOP_WARNING,
- ITEM_EQUIPPED,
- ITEM_EQUIPPED_OUTLINE,
- ITEM_NOT_EQUIPPED,
- ITEM_NOT_EQUIPPED_OUTLINE,
- CHAT,
- CHAT_OUTLINE,
- GM,
- GM_OUTLINE,
- GLOBAL,
- GLOBAL_OUTLINE,
- PLAYER,
- PLAYER_OUTLINE,
- WHISPER_TAB,
- WHISPER_TAB_OUTLINE,
- WHISPER_TAB_OFFLINE,
- WHISPER_TAB_OFFLINE_OUTLINE,
- WHISPER_TAB_HIGHLIGHTED,
- WHISPER_TAB_HIGHLIGHTED_OUTLINE,
- WHISPER_TAB_OFFLINE_HIGHLIGHTED,
- WHISPER_TAB_OFFLINE_HIGHLIGHTED_OUTLINE,
- WHISPER_TAB_SELECTED,
- WHISPER_TAB_SELECTED_OUTLINE,
- WHISPER_TAB_OFFLINE_SELECTED,
- WHISPER_TAB_OFFLINE_SELECTED_OUTLINE,
- IS,
- IS_OUTLINE,
- SERVER,
- SERVER_OUTLINE,
- LOGGER,
- LOGGER_OUTLINE,
- HYPERLINK,
- HYPERLINK_OUTLINE,
- UNKNOWN_ITEM,
- UNKNOWN_ITEM_OUTLINE,
- GENERIC,
- GENERIC_OUTLINE,
- HEAD,
- HEAD_OUTLINE,
- USABLE,
- USABLE_OUTLINE,
- TORSO,
- TORSO_OUTLINE,
- ONEHAND,
- ONEHAND_OUTLINE,
- LEGS,
- LEGS_OUTLINE,
- FEET,
- FEET_OUTLINE,
- TWOHAND,
- TWOHAND_OUTLINE,
- SHIELD,
- SHIELD_OUTLINE,
- RING,
- RING_OUTLINE,
- NECKLACE,
- NECKLACE_OUTLINE,
- ARMS,
- ARMS_OUTLINE,
- AMMO,
- AMMO_OUTLINE,
- SERVER_VERSION_NOT_SUPPORTED,
- SERVER_VERSION_NOT_SUPPORTED_OUTLINE,
- WARNING,
- WARNING_OUTLINE,
- CHARM,
- CHARM_OUTLINE,
- PLAYER_ADVANCED,
- PLAYER_ADVANCED_OUTLINE,
- BUBBLE_NAME,
- BUBBLE_NAME_OUTLINE,
- BUBBLE_TEXT,
- BUBBLE_TEXT_OUTLINE,
- BLACK,
- BLACK_OUTLINE,
- RED,
- RED_OUTLINE,
- GREEN,
- GREEN_OUTLINE,
- BLUE,
- BLUE_OUTLINE,
- ORANGE,
- ORANGE_OUTLINE,
- YELLOW,
- YELLOW_OUTLINE,
- PINK,
- PINK_OUTLINE,
- PURPLE,
- PURPLE_OUTLINE,
- GRAY,
- GRAY_OUTLINE,
- BROWN,
- BROWN_OUTLINE,
- STATUSBAR_ON,
- STATUSBAR_OFF,
- TABLE_BACKGROUND,
- SLOTS_BAR,
- SLOTS_BAR_OUTLINE,
- HP_BAR,
- HP_BAR_OUTLINE,
- MP_BAR,
- MP_BAR_OUTLINE,
- NO_MP_BAR,
- NO_MP_BAR_OUTLINE,
- XP_BAR,
- XP_BAR_OUTLINE,
- WEIGHT_BAR,
- WEIGHT_BAR_OUTLINE,
- MONEY_BAR,
- MONEY_BAR_OUTLINE,
- ARROWS_BAR,
- ARROWS_BAR_OUTLINE,
- STATUS_BAR,
- STATUS_BAR_OUTLINE,
- JOB_BAR,
- JOB_BAR_OUTLINE,
- OLDCHAT,
- OLDCHAT_OUTLINE,
- AWAYCHAT,
- AWAYCHAT_OUTLINE,
- SKILL_COOLDOWN,
- TEXT_DISABLED,
- TEXT_DISABLED_OUTLINE,
- THEME_COLORS_END
- };
enum ProgressPalette
{
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index a7d060b10..b2ee21937 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -73,8 +73,8 @@ AvatarListBox::AvatarListBox(const Widget2 *const widget,
config.addListener("showgender", this);
config.addListener("showlevel", this);
- mForegroundColor = getThemeColor(Theme::TEXT);
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
}
AvatarListBox::~AvatarListBox()
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 007f2afa7..068894418 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -72,8 +72,8 @@ ImageSet *BrowserBox::mEmotes = nullptr;
int BrowserBox::mInstances = 0;
#define readColor(color) \
- mColors[0][color] = getThemeColor(Theme::color); \
- mColors[1][color] = getThemeColor(Theme::color##_OUTLINE)
+ mColors[0][color] = getThemeColor(ThemeColorId::color); \
+ mColors[1][color] = getThemeColor(ThemeColorId::color##_OUTLINE)
BrowserBox::BrowserBox(const Widget2 *const widget,
const unsigned int mode,
@@ -99,8 +99,8 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
mNewLinePadding(15),
mItemPadding(0),
mDataWidth(0),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
- mHyperLinkColor(getThemeColor(Theme::HYPERLINK)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
+ mHyperLinkColor(getThemeColor(ThemeColorId::HYPERLINK)),
mOpaque(opaque),
mUseLinksAndUserColors(true),
mUseEmotes(true),
@@ -115,7 +115,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
setFocusable(true);
addMouseListener(this);
- mBackgroundColor = getThemeColor(Theme::BACKGROUND);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
if (theme)
mSkin = theme->load(skin, "browserbox.xml");
@@ -148,8 +148,8 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
readColor(GRAY);
readColor(BROWN);
- mForegroundColor = getThemeColor(Theme::BROWSERBOX);
- mForegroundColor2 = getThemeColor(Theme::BROWSERBOX_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::BROWSERBOX);
+ mForegroundColor2 = getThemeColor(ThemeColorId::BROWSERBOX_OUTLINE);
}
BrowserBox::~BrowserBox()
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index d40d8ab68..0d7bafd74 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -108,14 +108,14 @@ Button::Button(const Widget2 *const widget) :
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- mEnabledColor(getThemeColor(Theme::BUTTON)),
- mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
- mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
- mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
- mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
- mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -151,14 +151,14 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- mEnabledColor(getThemeColor(Theme::BUTTON)),
- mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
- mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
- mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
- mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
- mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -200,14 +200,14 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- mEnabledColor(getThemeColor(Theme::BUTTON)),
- mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
- mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
- mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
- mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
- mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -249,14 +249,14 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- mEnabledColor(getThemeColor(Theme::BUTTON)),
- mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
- mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
- mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
- mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
- mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -298,14 +298,14 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- mEnabledColor(getThemeColor(Theme::BUTTON)),
- mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
- mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
- mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
- mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
- mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 90192c74a..69479aba0 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -111,7 +111,7 @@ CheckBox::CheckBox(const Widget2 *const widget,
addMouseListener(this);
addKeyListener(this);
- mForegroundColor2 = getThemeColor(Theme::CHECKBOX_OUTLINE);
+ mForegroundColor2 = getThemeColor(ThemeColorId::CHECKBOX_OUTLINE);
if (instances == 0)
{
if (theme)
@@ -129,7 +129,7 @@ CheckBox::CheckBox(const Widget2 *const widget,
if (listener)
addActionListener(listener);
- mForegroundColor = getThemeColor(Theme::CHECKBOX);
+ mForegroundColor = getThemeColor(ThemeColorId::CHECKBOX);
if (mSkin)
{
mPadding = mSkin->getPadding();
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 086854a73..18cb7b138 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -48,8 +48,8 @@ Desktop::Desktop(const Widget2 *const widget) :
mVersionLabel(new BrowserBox(this, BrowserBox::AUTO_WRAP, false,
"browserbox.xml")),
mSkin(nullptr),
- mBackgroundColor(getThemeColor(Theme::BACKGROUND, 128)),
- mBackgroundGrayColor(getThemeColor(Theme::BACKGROUND_GRAY)),
+ mBackgroundColor(getThemeColor(ThemeColorId::BACKGROUND, 128)),
+ mBackgroundGrayColor(getThemeColor(ThemeColorId::BACKGROUND_GRAY)),
mShowBackground(true)
{
addWidgetListener(this);
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index f46d0f282..d6ff28e43 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -64,8 +64,8 @@ DropDown::DropDown(const Widget2 *const widget,
FocusListener(),
SelectionListener(),
mPopup(new PopupList(this, listModel, extended, modal)),
- mShadowColor(getThemeColor(Theme::DROPDOWN_SHADOW)),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
+ mShadowColor(getThemeColor(ThemeColorId::DROPDOWN_SHADOW)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
mPadding(1),
mImagePadding(2),
mSpacing(0),
@@ -79,7 +79,7 @@ DropDown::DropDown(const Widget2 *const widget,
mAllowLogic = false;
mPopup->postInit();
mFrameSize = 2;
- mForegroundColor2 = getThemeColor(Theme::DROPDOWN_OUTLINE);
+ mForegroundColor2 = getThemeColor(ThemeColorId::DROPDOWN_OUTLINE);
mPopup->setHeight(100);
@@ -137,10 +137,10 @@ DropDown::DropDown(const Widget2 *const widget,
addFocusListener(this);
adjustHeight();
-// mPopup->setForegroundColorAll(getThemeColor(Theme::DROPDOWN),
-// getThemeColor(Theme::DROPDOWN_OUTLINE));
- mForegroundColor = getThemeColor(Theme::DROPDOWN);
- mForegroundColor2 = getThemeColor(Theme::DROPDOWN_OUTLINE);
+// mPopup->setForegroundColorAll(getThemeColor(ThemeColorId::DROPDOWN),
+// getThemeColor(ThemeColorId::DROPDOWN_OUTLINE));
+ mForegroundColor = getThemeColor(ThemeColorId::DROPDOWN);
+ mForegroundColor2 = getThemeColor(ThemeColorId::DROPDOWN_OUTLINE);
if (!eventId.empty())
setActionEventId(eventId);
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index 05037cd51..eb6efedb6 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -71,8 +71,8 @@ EmoteShortcutContainer::~EmoteShortcutContainer()
void EmoteShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- mForegroundColor = getThemeColor(Theme::TEXT);
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
}
void EmoteShortcutContainer::draw(Graphics *graphics)
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index c08170348..2927b1284 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -48,7 +48,7 @@ GuiTable::GuiTable(const Widget2 *const widget,
mModel(nullptr),
mTopWidget(nullptr),
mActionListeners2(),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
mSelectedRow(-1),
mSelectedColumn(-1),
mLinewiseMode(false),
@@ -57,7 +57,7 @@ GuiTable::GuiTable(const Widget2 *const widget,
mSelectable(true)
{
mAllowLogic = false;
- mBackgroundColor = getThemeColor(Theme::BACKGROUND);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
setModel(initial_model);
setFocusable(true);
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index ff20e024e..7e9049aa0 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -167,10 +167,10 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mName(),
mShowMatrix(nullptr),
mSkin(theme ? theme->load("itemcontainer.xml", "") : nullptr),
- mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)),
+ mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED)),
+ mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE)),
+ mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED)),
+ mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE)),
mSelectionListeners(),
mGridColumns(1),
mGridRows(1),
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 6a2aa4c93..15af7c286 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -53,10 +53,10 @@ ItemShortcutContainer::ItemShortcutContainer(Widget2 *const widget,
ShortcutContainer(widget),
mItemClicked(false),
mNumber(number),
- mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE))
+ mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED)),
+ mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE)),
+ mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED)),
+ mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE))
{
if (itemShortcut[mNumber])
mMaxItems = itemShortcut[mNumber]->getItemCount();
@@ -71,12 +71,12 @@ ItemShortcutContainer::~ItemShortcutContainer()
void ItemShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- mEquipedColor = getThemeColor(Theme::ITEM_EQUIPPED);
- mEquipedColor2 = getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE);
- mUnEquipedColor = getThemeColor(Theme::ITEM_NOT_EQUIPPED);
- mUnEquipedColor2 = getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE);
- mForegroundColor = getThemeColor(Theme::TEXT);
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
+ mEquipedColor = getThemeColor(ThemeColorId::ITEM_EQUIPPED);
+ mEquipedColor2 = getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE);
+ mUnEquipedColor = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED);
+ mUnEquipedColor2 = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
}
void ItemShortcutContainer::draw(Graphics *graphics)
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index abe7b62b6..e3ba34d26 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -129,8 +129,8 @@ void Label::init()
{
addMouseListener(this);
mAllowLogic = false;
- mForegroundColor = getThemeColor(Theme::LABEL);
- mForegroundColor2 = getThemeColor(Theme::LABEL_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::LABEL);
+ mForegroundColor2 = getThemeColor(ThemeColorId::LABEL_OUTLINE);
if (mInstances == 0)
{
if (theme)
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 4d7befa8c..0a38d6133 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -93,9 +93,9 @@ ListBox::ListBox(const Widget2 *const widget,
mListModel(listModel),
mWrappingEnabled(false),
mSelectionListeners(),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
- mForegroundSelectedColor(getThemeColor(Theme::LISTBOX_SELECTED)),
- mForegroundSelectedColor2(getThemeColor(Theme::LISTBOX_SELECTED_OUTLINE)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
+ mForegroundSelectedColor(getThemeColor(ThemeColorId::LISTBOX_SELECTED)),
+ mForegroundSelectedColor2(getThemeColor(ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
mOldSelected(-1),
mPadding(0),
mPressedIndex(-2),
@@ -110,8 +110,8 @@ ListBox::ListBox(const Widget2 *const widget,
addMouseListener(this);
addKeyListener(this);
- mForegroundColor = getThemeColor(Theme::LISTBOX);
- mForegroundColor2 = getThemeColor(Theme::LISTBOX_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::LISTBOX);
+ mForegroundColor2 = getThemeColor(ThemeColorId::LISTBOX_OUTLINE);
if (theme)
mSkin = theme->load(skin, "listbox.xml");
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index da11c779d..dfba99892 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -65,13 +65,13 @@ ProgressBar::ProgressBar(const Widget2 *const widget,
mBackgroundColor = Theme::getProgressColor(backColor >= 0
? backColor : 0, mProgress);
mBackgroundColorToGo = mBackgroundColor;
- mForegroundColor2 = getThemeColor(Theme::PROGRESS_BAR_OUTLINE);
+ mForegroundColor2 = getThemeColor(ThemeColorId::PROGRESS_BAR_OUTLINE);
// The progress value is directly set at load time:
if (mProgress > 1.0F || mProgress < 0.0F)
mProgress = 1.0F;
- mForegroundColor = getThemeColor(Theme::PROGRESS_BAR);
+ mForegroundColor = getThemeColor(ThemeColorId::PROGRESS_BAR);
addWidgetListener(this);
setSize(width, height);
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index f1730b367..c7089a8ad 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -114,8 +114,8 @@ RadioButton::RadioButton(const Widget2 *const widget,
addMouseListener(this);
addKeyListener(this);
- mForegroundColor = getThemeColor(Theme::RADIOBUTTON);
- mForegroundColor2 = getThemeColor(Theme::RADIOBUTTON_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::RADIOBUTTON);
+ mForegroundColor2 = getThemeColor(ThemeColorId::RADIOBUTTON_OUTLINE);
if (instances == 0)
{
if (theme)
diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h
index b7129eb39..5586cf1d1 100644
--- a/src/gui/widgets/serverslistbox.h
+++ b/src/gui/widgets/serverslistbox.h
@@ -36,11 +36,11 @@ class ServersListBox final : public ListBox
ServersListModel *const model) :
ListBox(widget, model, "serverslistbox.xml"),
mNotSupportedColor(getThemeColor(
- Theme::SERVER_VERSION_NOT_SUPPORTED)),
+ ThemeColorId::SERVER_VERSION_NOT_SUPPORTED)),
mNotSupportedColor2(getThemeColor(
- Theme::SERVER_VERSION_NOT_SUPPORTED_OUTLINE))
+ ThemeColorId::SERVER_VERSION_NOT_SUPPORTED_OUTLINE))
{
- mHighlightColor = getThemeColor(Theme::HIGHLIGHT);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
}
void draw(Graphics *graphics) override final
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index a5e5937ef..788a493a9 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -47,14 +47,14 @@ ShopListBox::ShopListBox(const Widget2 *const widget,
ListBox(widget, listModel, "shoplistbox.xml"),
mPlayerMoney(0),
mShopItems(nullptr),
- mBackgroundColor(getThemeColor(Theme::BACKGROUND)),
- mWarningColor(getThemeColor(Theme::SHOP_WARNING)),
+ mBackgroundColor(getThemeColor(ThemeColorId::BACKGROUND)),
+ mWarningColor(getThemeColor(ThemeColorId::SHOP_WARNING)),
mPriceCheck(true),
mProtectItems(false)
{
mRowHeight = getFont()->getHeight();
- mHighlightColor = getThemeColor(Theme::HIGHLIGHT);
- mForegroundColor = getThemeColor(Theme::LISTBOX);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
+ mForegroundColor = getThemeColor(ThemeColorId::LISTBOX);
}
ShopListBox::ShopListBox(const Widget2 *const widget,
@@ -63,14 +63,14 @@ ShopListBox::ShopListBox(const Widget2 *const widget,
ListBox(widget, listModel, "shoplistbox.xml"),
mPlayerMoney(0),
mShopItems(shopListModel),
- mBackgroundColor(getThemeColor(Theme::BACKGROUND)),
- mWarningColor(getThemeColor(Theme::SHOP_WARNING)),
+ mBackgroundColor(getThemeColor(ThemeColorId::BACKGROUND)),
+ mWarningColor(getThemeColor(ThemeColorId::SHOP_WARNING)),
mPriceCheck(true),
mProtectItems(false)
{
mRowHeight = std::max(getFont()->getHeight(), ITEM_ICON_SIZE);
- mHighlightColor = getThemeColor(Theme::HIGHLIGHT);
- mForegroundColor = getThemeColor(Theme::LISTBOX);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
+ mForegroundColor = getThemeColor(ThemeColorId::LISTBOX);
}
void ShopListBox::setPlayersMoney(const int money)
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index e38b4c294..c90d2261c 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -54,8 +54,8 @@ ShortcutContainer::ShortcutContainer(Widget2 *const widget) :
addMouseListener(this);
addWidgetListener(this);
- mForegroundColor = getThemeColor(Theme::TEXT);
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
mBackgroundImg = Theme::getImageFromThemeXml(
"item_shortcut_background.xml", "background.xml");
diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h
index 4b2db054c..2756057f7 100644
--- a/src/gui/widgets/skilllistbox.h
+++ b/src/gui/widgets/skilllistbox.h
@@ -55,15 +55,15 @@ class SkillListBox final : public ListBox
ListBox(widget, model, "skilllistbox.xml"),
mModel(model),
mPopup(new SkillPopup),
- mTextColor(getThemeColor(Theme::TEXT)),
- mTextColor2(getThemeColor(Theme::TEXT_OUTLINE)),
- mCooldownColor(getThemeColor(Theme::SKILL_COOLDOWN)),
+ mTextColor(getThemeColor(ThemeColorId::TEXT)),
+ mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE)),
+ mCooldownColor(getThemeColor(ThemeColorId::SKILL_COOLDOWN)),
mTextPadding(mSkin ? mSkin->getOption("textPadding", 34) : 34),
mSpacing(mSkin ? mSkin->getOption("spacing", 0) : 0),
mSkillClicked(false)
{
mRowHeight = getFont()->getHeight() * 2 + mSpacing + 2 * mPadding;
- mHighlightColor = getThemeColor(Theme::HIGHLIGHT);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
mPopup->postInit();
if (mRowHeight < 34)
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 796964801..4c4b444d8 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -57,8 +57,8 @@ SpellShortcutContainer::~SpellShortcutContainer()
void SpellShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- mForegroundColor = getThemeColor(Theme::TEXT);
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
}
void SpellShortcutContainer::draw(Graphics *graphics)
diff --git a/src/gui/widgets/tabs/chat/battletab.cpp b/src/gui/widgets/tabs/chat/battletab.cpp
index cedee0d90..70d9aa44d 100644
--- a/src/gui/widgets/tabs/chat/battletab.cpp
+++ b/src/gui/widgets/tabs/chat/battletab.cpp
@@ -34,7 +34,7 @@ BattleTab::BattleTab(const Widget2 *const widget) :
// TRANSLATORS: battle chat tab name
ChatTab(widget, _("Battle"), "", "#Battle", ChatTabType::BATTLE)
{
- setTabColors(Theme::BATTLE_CHAT_TAB);
+ setTabColors(ThemeColorId::BATTLE_CHAT_TAB);
if (config.getBoolValue("showChatHistory"))
loadFromLogFile("#Battle");
}
diff --git a/src/gui/widgets/tabs/chat/channeltab.cpp b/src/gui/widgets/tabs/chat/channeltab.cpp
index 7c4b43bf6..1c2c129b3 100644
--- a/src/gui/widgets/tabs/chat/channeltab.cpp
+++ b/src/gui/widgets/tabs/chat/channeltab.cpp
@@ -34,7 +34,7 @@ ChannelTab::ChannelTab(const Widget2 *const widget,
const std::string &channel) :
ChatTab(widget, channel, channel, channel, ChatTabType::CHANNEL)
{
- setTabColors(Theme::CHANNEL_CHAT_TAB);
+ setTabColors(ThemeColorId::CHANNEL_CHAT_TAB);
}
ChannelTab::~ChannelTab()
diff --git a/src/gui/widgets/tabs/chat/emulateguildtab.cpp b/src/gui/widgets/tabs/chat/emulateguildtab.cpp
index ccdf1bd43..e4d0d8dd1 100644
--- a/src/gui/widgets/tabs/chat/emulateguildtab.cpp
+++ b/src/gui/widgets/tabs/chat/emulateguildtab.cpp
@@ -38,7 +38,7 @@ EmulateGuildTab::EmulateGuildTab(const Widget2 *const widget) :
// TRANSLATORS: guild chat tab name
ChatTab(widget, _("Guild"), "", "#Guild", ChatTabType::GUILD)
{
- setTabColors(Theme::GUILD_CHAT_TAB);
+ setTabColors(ThemeColorId::GUILD_CHAT_TAB);
mShowOnline = config.getBoolValue("showGuildOnline");
config.addListener("showGuildOnline", this);
}
diff --git a/src/gui/widgets/tabs/chat/gmtab.cpp b/src/gui/widgets/tabs/chat/gmtab.cpp
index caa475309..a54798fc5 100644
--- a/src/gui/widgets/tabs/chat/gmtab.cpp
+++ b/src/gui/widgets/tabs/chat/gmtab.cpp
@@ -35,7 +35,7 @@ GmTab::GmTab(const Widget2 *const widget) :
// TRANSLATORS: gb tab name
ChatTab(widget, _("GM"), GM_CHANNEL, "#GM", ChatTabType::GM)
{
- setTabColors(Theme::GM_CHAT_TAB);
+ setTabColors(ThemeColorId::GM_CHAT_TAB);
}
GmTab::~GmTab()
diff --git a/src/gui/widgets/tabs/chat/guildtab.cpp b/src/gui/widgets/tabs/chat/guildtab.cpp
index 512104fd5..4d4d7d1d2 100644
--- a/src/gui/widgets/tabs/chat/guildtab.cpp
+++ b/src/gui/widgets/tabs/chat/guildtab.cpp
@@ -43,7 +43,7 @@ GuildTab::GuildTab(const Widget2 *const widget) :
// TRANSLATORS: guild chat tab name
ChatTab(widget, _("Guild"), "", "#Guild", ChatTabType::GUILD)
{
- setTabColors(Theme::GUILD_CHAT_TAB);
+ setTabColors(ThemeColorId::GUILD_CHAT_TAB);
mShowOnline = config.getBoolValue("showGuildOnline");
config.addListener("showGuildOnline", this);
}
diff --git a/src/gui/widgets/tabs/chat/partytab.cpp b/src/gui/widgets/tabs/chat/partytab.cpp
index 45f420703..489f03c94 100644
--- a/src/gui/widgets/tabs/chat/partytab.cpp
+++ b/src/gui/widgets/tabs/chat/partytab.cpp
@@ -44,7 +44,7 @@ PartyTab::PartyTab(const Widget2 *const widget) :
// TRANSLATORS: party chat tab name
ChatTab(widget, _("Party"), "", "#Party", ChatTabType::PARTY)
{
- setTabColors(Theme::PARTY_CHAT_TAB);
+ setTabColors(ThemeColorId::PARTY_CHAT_TAB);
mShowOnline = config.getBoolValue("showPartyOnline");
config.addListener("showPartyOnline", this);
}
diff --git a/src/gui/widgets/tabs/chat/whispertab.cpp b/src/gui/widgets/tabs/chat/whispertab.cpp
index 87de80724..8d1c920b3 100644
--- a/src/gui/widgets/tabs/chat/whispertab.cpp
+++ b/src/gui/widgets/tabs/chat/whispertab.cpp
@@ -121,10 +121,10 @@ void WhisperTab::getAutoCompleteCommands(StringVect& commands) const
void WhisperTab::setWhisperTabColors()
{
- setTabColors(Theme::WHISPER_TAB);
+ setTabColors(ThemeColorId::WHISPER_TAB);
}
void WhisperTab::setWhisperTabOfflineColors()
{
- setTabColors(Theme::WHISPER_TAB_OFFLINE);
+ setTabColors(ThemeColorId::WHISPER_TAB_OFFLINE);
}
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index ffa5e1a66..06d35daf0 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -87,7 +87,7 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
mPlayerTableTitleModel->fixColumnWidth(RELATION_CHOICE_COLUMN,
RELATION_CHOICE_COLUMN_WIDTH);
mPlayerTitleTable->setBackgroundColor(getThemeColor(
- Theme::TABLE_BACKGROUND));
+ ThemeColorId::TABLE_BACKGROUND));
mPlayerTitleTable->setSelectable(false);
for (int i = 0; i < COLUMNS_NR; i++)
diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h
index 8f09f7bde..b51f8bc38 100644
--- a/src/gui/widgets/tabs/socialguildtab.h
+++ b/src/gui/widgets/tabs/socialguildtab.h
@@ -48,14 +48,14 @@ class SocialGuildTab final : public SocialTab,
// TRANSLATORS: tab in social window
setCaption(_("Guild"));
- setTabColor(&getThemeColor(Theme::GUILD_SOCIAL_TAB),
- &getThemeColor(Theme::GUILD_SOCIAL_TAB_OUTLINE));
+ setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB),
+ &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE));
setHighlightedTabColor(&getThemeColor(
- Theme::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
- Theme::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
- Theme::GUILD_SOCIAL_TAB_SELECTED),
- &getThemeColor(Theme::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
+ &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 e17b97466..fb3857214 100644
--- a/src/gui/widgets/tabs/socialguildtab2.h
+++ b/src/gui/widgets/tabs/socialguildtab2.h
@@ -47,14 +47,14 @@ class SocialGuildTab2 final : public SocialTab,
// TRANSLATORS: tab in social window
setCaption(_("Guild"));
- setTabColor(&getThemeColor(Theme::GUILD_SOCIAL_TAB),
- &getThemeColor(Theme::GUILD_SOCIAL_TAB_OUTLINE));
+ setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB),
+ &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE));
setHighlightedTabColor(&getThemeColor(
- Theme::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
- Theme::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
- Theme::GUILD_SOCIAL_TAB_SELECTED),
- &getThemeColor(Theme::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
+ &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 83d29ec1b..ff634bf3c 100644
--- a/src/gui/widgets/tabs/socialpartytab.h
+++ b/src/gui/widgets/tabs/socialpartytab.h
@@ -50,14 +50,14 @@ class SocialPartyTab final : public SocialTab,
// TRANSLATORS: tab in social window
setCaption(_("Party"));
- setTabColor(&getThemeColor(Theme::PARTY_SOCIAL_TAB),
- &getThemeColor(Theme::PARTY_SOCIAL_TAB_OUTLINE));
+ setTabColor(&getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB),
+ &getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB_OUTLINE));
setHighlightedTabColor(&getThemeColor(
- Theme::PARTY_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
- Theme::PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
+ ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
+ ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
- Theme::PARTY_SOCIAL_TAB_SELECTED),
- &getThemeColor(Theme::PARTY_SOCIAL_TAB_SELECTED_OUTLINE));
+ ThemeColorId::PARTY_SOCIAL_TAB_SELECTED),
+ &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 ed9d70e30..d8f58bf8d 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -105,17 +105,17 @@ Tab::Tab(const Widget2 *const widget) :
WidgetListener(),
mLabel(new Label(this)),
mTabbedArea(nullptr),
- mTabColor(&getThemeColor(Theme::TAB)),
- mTabOutlineColor(&getThemeColor(Theme::TAB_OUTLINE)),
- mTabHighlightedColor(&getThemeColor(Theme::TAB_HIGHLIGHTED)),
+ mTabColor(&getThemeColor(ThemeColorId::TAB)),
+ mTabOutlineColor(&getThemeColor(ThemeColorId::TAB_OUTLINE)),
+ mTabHighlightedColor(&getThemeColor(ThemeColorId::TAB_HIGHLIGHTED)),
mTabHighlightedOutlineColor(&getThemeColor(
- Theme::TAB_HIGHLIGHTED_OUTLINE)),
- mTabSelectedColor(&getThemeColor(Theme::TAB_SELECTED)),
- mTabSelectedOutlineColor(&getThemeColor(Theme::TAB_SELECTED_OUTLINE)),
- mFlashColor(&getThemeColor(Theme::TAB_FLASH)),
- mFlashOutlineColor(&getThemeColor(Theme::TAB_FLASH_OUTLINE)),
- mPlayerFlashColor(&getThemeColor(Theme::TAB_PLAYER_FLASH)),
- mPlayerFlashOutlineColor(&getThemeColor(Theme::TAB_PLAYER_FLASH_OUTLINE)),
+ ThemeColorId::TAB_HIGHLIGHTED_OUTLINE)),
+ mTabSelectedColor(&getThemeColor(ThemeColorId::TAB_SELECTED)),
+ 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)),
mFlash(0),
mVertexes(new ImageCollection),
mImage(nullptr),
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 60d8bd13b..e235fd04e 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -94,7 +94,7 @@ TextBox::TextBox(const Widget2 *const widget) :
addKeyListener(this);
adjustSize();
- mForegroundColor = getThemeColor(Theme::TEXTBOX);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXTBOX);
setOpaque(false);
setFrameSize(0);
}
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index b58f654b0..8639d8f80 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -110,7 +110,7 @@ TextField::TextField(const Widget2 *restrict const widget,
mTextChunk(),
mCaretPosition(0),
mXScroll(0),
- mCaretColor(&getThemeColor(Theme::CARET)),
+ mCaretColor(&getThemeColor(ThemeColorId::CARET)),
mMinimum(0),
mMaximum(0),
mLastEventPaste(false),
@@ -127,8 +127,8 @@ TextField::TextField(const Widget2 *restrict const widget,
addKeyListener(this);
setFrameSize(2);
- mForegroundColor = getThemeColor(Theme::TEXTFIELD);
- mForegroundColor2 = getThemeColor(Theme::TEXTFIELD_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXTFIELD);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXTFIELD_OUTLINE);
addFocusListener(this);
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index d07ae4e7f..505462460 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -40,9 +40,9 @@ TextPreview::TextPreview(const Widget2 *const widget,
Widget(widget),
mFont(gui->getFont()),
mText(text),
- mTextColor(&getThemeColor(Theme::TEXT)),
- mTextColor2(&getThemeColor(Theme::TEXT_OUTLINE)),
- mBGColor(&getThemeColor(Theme::BACKGROUND)),
+ mTextColor(&getThemeColor(ThemeColorId::TEXT)),
+ mTextColor2(&getThemeColor(ThemeColorId::TEXT_OUTLINE)),
+ mBGColor(&getThemeColor(ThemeColorId::BACKGROUND)),
mTextBGColor(nullptr),
mPadding(0),
mTextAlpha(false),
@@ -118,7 +118,7 @@ void TextPreview::draw(Graphics* graphics)
if (mOutline && mTextColor != mTextColor2)
{
- const Color &color2 = getThemeColor(Theme::OUTLINE, 255);
+ const Color &color2 = getThemeColor(ThemeColorId::OUTLINE, 255);
mFont->drawString(graphics,
color1,
color2,
diff --git a/src/gui/widgets/virtshortcutcontainer.cpp b/src/gui/widgets/virtshortcutcontainer.cpp
index 44ea247cc..2d72234a0 100644
--- a/src/gui/widgets/virtshortcutcontainer.cpp
+++ b/src/gui/widgets/virtshortcutcontainer.cpp
@@ -45,10 +45,10 @@ VirtShortcutContainer::VirtShortcutContainer(Widget2 *const widget,
ShortcutBase *const shortcut) :
ShortcutContainer(widget),
mItemClicked(false),
- mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)),
+ mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED)),
+ mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE)),
+ mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED)),
+ mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE)),
mShortcut(shortcut)
{
if (mShortcut)
@@ -64,10 +64,10 @@ VirtShortcutContainer::~VirtShortcutContainer()
void VirtShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- mEquipedColor = getThemeColor(Theme::ITEM_EQUIPPED);
- mEquipedColor2 = getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE);
- mUnEquipedColor = getThemeColor(Theme::ITEM_NOT_EQUIPPED);
- mUnEquipedColor2 = getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE);
+ mEquipedColor = getThemeColor(ThemeColorId::ITEM_EQUIPPED);
+ mEquipedColor2 = getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE);
+ mUnEquipedColor = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED);
+ mUnEquipedColor2 = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE);
}
void VirtShortcutContainer::draw(Graphics *graphics)
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index 2fdb8b12b..9fad6a882 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -21,6 +21,8 @@
#ifndef GUI_WIDGETS_WIDGET2_H
#define GUI_WIDGETS_WIDGET2_H
+#include "enums/gui/themecolorid.h"
+
#include "gui/theme.h"
class Widget;
@@ -59,7 +61,7 @@ class Widget2 notfinal
void setPalette(int palette)
{
- mPaletteOffset = palette * Theme::THEME_COLORS_END;
+ mPaletteOffset = palette * ThemeColorId::THEME_COLORS_END;
checkPalette();
setWidget2(this);
}
@@ -67,7 +69,7 @@ class Widget2 notfinal
void checkPalette()
{
if (mPaletteOffset < 0 || mPaletteOffset
- >= THEME_PALETTES * Theme::THEME_COLORS_END)
+ >= THEME_PALETTES * ThemeColorId::THEME_COLORS_END)
{
mPaletteOffset = 0;
}
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 2187056f9..2316af653 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -224,8 +224,8 @@ Window::Window(const std::string &caption,
setVisible(Visible_false);
addWidgetListener(this);
- mForegroundColor = getThemeColor(Theme::WINDOW);
- mForegroundColor2 = getThemeColor(Theme::WINDOW_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::WINDOW);
+ mForegroundColor2 = getThemeColor(ThemeColorId::WINDOW_OUTLINE);
setPalette(childPalette);
}
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index a847c3fff..9c6602176 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -79,10 +79,10 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
mVertexes(new ImageCollection),
mPages(),
mTabs(nullptr),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
- mBorderColor(getThemeColor(Theme::BORDER)),
- mLabelsColor(getThemeColor(Theme::LABEL)),
- mLabelsColor2(getThemeColor(Theme::LABEL_OUTLINE)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
+ mBorderColor(getThemeColor(ThemeColorId::BORDER)),
+ mLabelsColor(getThemeColor(ThemeColorId::LABEL)),
+ mLabelsColor2(getThemeColor(ThemeColorId::LABEL_OUTLINE)),
mSelected(-1),
mItemPadding(getOption("itemPadding")),
mBoxSize(getOption("boxSize")),
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 63cde64f7..8b46f5e55 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -106,8 +106,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mSplit(false),
mCompactMode(false)
{
- mSlotsBar->setColor(getThemeColor(Theme::SLOTS_BAR),
- getThemeColor(Theme::SLOTS_BAR_OUTLINE));
+ mSlotsBar->setColor(getThemeColor(ThemeColorId::SLOTS_BAR),
+ getThemeColor(ThemeColorId::SLOTS_BAR_OUTLINE));
if (inventory)
{
@@ -217,8 +217,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
- mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
- getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
+ mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR),
+ getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE));
// TRANSLATORS: outfits button tooltip
mOutfitButton->setDescription(_("Outfits"));
@@ -286,8 +286,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
- mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
- getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
+ mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR),
+ getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE));
mSlotsBarCell = &place(3, 0, mSlotsBar, 3);
mSortDropDownCell = &place(6, 0, mSortDropDown, 1);
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 250258ca7..4af6467fb 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -67,12 +67,12 @@ MiniStatusWindow::MiniStatusWindow() :
mBarNames(),
mIcons(),
// TRANSLATORS: status bar name
- mHpBar(createBar(0, 100, 0, Theme::HP_BAR, Theme::PROG_HP,
+ mHpBar(createBar(0, 100, 0, ThemeColorId::HP_BAR, Theme::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml",
"hp bar", _("health bar"))),
mMpBar(gameHandler->canUseMagicBar()
? createBar(0, 100, 0, playerHandler->canUseMagic()
- ? Theme::MP_BAR : Theme::NO_MP_BAR,
+ ? ThemeColorId::MP_BAR : ThemeColorId::NO_MP_BAR,
playerHandler->canUseMagic()
? Theme::PROG_MP : Theme::PROG_NO_MP,
playerHandler->canUseMagic()
@@ -81,31 +81,31 @@ MiniStatusWindow::MiniStatusWindow() :
? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml",
// TRANSLATORS: status bar name
"mp bar", _("mana bar")) : nullptr),
- mXpBar(createBar(0, 100, 0, Theme::XP_BAR, Theme::PROG_EXP,
+ mXpBar(createBar(0, 100, 0, ThemeColorId::XP_BAR, Theme::PROG_EXP,
"xpprogressbar.xml", "xpprogressbar_fill.xml",
// TRANSLATORS: status bar name
"xp bar", _("experience bar"))),
mJobBar(nullptr),
- mWeightBar(createBar(0, 140, 0, Theme::WEIGHT_BAR, Theme::PROG_WEIGHT,
+ mWeightBar(createBar(0, 140, 0, ThemeColorId::WEIGHT_BAR, Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml",
// TRANSLATORS: status bar name
"weight bar", _("weight bar"))),
mInvSlotsBar(createBar(0, 45, 0,
- Theme::SLOTS_BAR, Theme::PROG_INVY_SLOTS,
+ ThemeColorId::SLOTS_BAR, Theme::PROG_INVY_SLOTS,
"slotsprogressbar.xml", "slotsprogressbar_fill.xml",
"inventory slots bar",
// TRANSLATORS: status bar name
_("inventory slots bar"))),
- mMoneyBar(createBar(0, 130, 0, Theme::MONEY_BAR, Theme::PROG_MONEY,
+ mMoneyBar(createBar(0, 130, 0, ThemeColorId::MONEY_BAR, Theme::PROG_MONEY,
"moneyprogressbar.xml", "moneyprogressbar_fill.xml",
// TRANSLATORS: status bar name
"money bar", _("money bar"))),
- mArrowsBar(createBar(0, 50, 0, Theme::ARROWS_BAR, Theme::PROG_ARROWS,
+ mArrowsBar(createBar(0, 50, 0, ThemeColorId::ARROWS_BAR, Theme::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, Theme::STATUS_BAR, Theme::PROG_STATUS,
+ ? 250 : 165), 0, ThemeColorId::STATUS_BAR, Theme::PROG_STATUS,
"statusprogressbar.xml", "statusprogressbar_fill.xml",
// TRANSLATORS: status bar name
"status bar", _("status bar"))),
@@ -128,7 +128,7 @@ MiniStatusWindow::MiniStatusWindow() :
if (job)
{
- mJobBar = createBar(0, 100, 0, Theme::JOB_BAR, Theme::PROG_JOB,
+ mJobBar = createBar(0, 100, 0, ThemeColorId::JOB_BAR, Theme::PROG_JOB,
// TRANSLATORS: status bar name
"jobprogressbar.xml", "jobprogressbar_fill.xml",
"job bar", _("job bar"));
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index e1f2c3b42..b3a17915d 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -71,7 +71,7 @@ OutfitWindow::OutfitWindow() :
// TRANSLATORS: outfits window label
mKeyLabel(new Label(this, strprintf(_("Key: %s"),
keyName(0).c_str()))),
- mBorderColor(getThemeColor(Theme::BORDER, 64)),
+ mBorderColor(getThemeColor(ThemeColorId::BORDER, 64)),
mCurrentOutfit(0),
mBoxWidth(33),
mBoxHeight(33),
@@ -88,7 +88,7 @@ OutfitWindow::OutfitWindow() :
setCloseButton(true);
setStickyButtonLock(true);
- mBackgroundColor = getThemeColor(Theme::BACKGROUND, 32);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 32);
setDefaultSize(250, 400, 150, 290);
setMinWidth(145);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index fb28aacb7..5e5dcff33 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -113,16 +113,16 @@ StatusWindow::StatusWindow() :
mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
Attributes::HP)) / static_cast<float>(max), 80, 0, Theme::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml");
- mHpBar->setColor(getThemeColor(Theme::HP_BAR),
- getThemeColor(Theme::HP_BAR_OUTLINE));
+ 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,
Theme::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml");
- mXpBar->setColor(getThemeColor(Theme::XP_BAR),
- getThemeColor(Theme::XP_BAR_OUTLINE));
+ mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR),
+ getThemeColor(ThemeColorId::XP_BAR_OUTLINE));
const bool magicBar = gameHandler->canUseMagicBar();
const bool job = serverConfig.getValueBool("showJob", true);
@@ -141,13 +141,13 @@ StatusWindow::StatusWindow() :
useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
{
- mMpBar->setColor(getThemeColor(Theme::MP_BAR),
- getThemeColor(Theme::MP_BAR_OUTLINE));
+ mMpBar->setColor(getThemeColor(ThemeColorId::MP_BAR),
+ getThemeColor(ThemeColorId::MP_BAR_OUTLINE));
}
else
{
- mMpBar->setColor(getThemeColor(Theme::NO_MP_BAR),
- getThemeColor(Theme::NO_MP_BAR_OUTLINE));
+ mMpBar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR),
+ getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE));
}
}
else
@@ -179,8 +179,8 @@ StatusWindow::StatusWindow() :
mJobLabel = new Label(this, _("Job:"));
mJobBar = new ProgressBar(this, 0.0F, 80, 0, Theme::PROG_JOB,
"jobprogressbar.xml", "jobprogressbar_fill.xml");
- mJobBar->setColor(getThemeColor(Theme::JOB_BAR),
- getThemeColor(Theme::JOB_BAR_OUTLINE));
+ mJobBar->setColor(getThemeColor(ThemeColorId::JOB_BAR),
+ getThemeColor(ThemeColorId::JOB_BAR_OUTLINE));
place(3, 0, mJobLvlLabel, 3);
place(5, 2, mJobLabel).setPadding(3);
@@ -466,14 +466,14 @@ void StatusWindow::updateMPBar(ProgressBar *const bar,
if (playerHandler->canUseMagic())
{
- bar->setColor(getThemeColor(Theme::MP_BAR),
- getThemeColor(Theme::MP_BAR_OUTLINE));
+ bar->setColor(getThemeColor(ThemeColorId::MP_BAR),
+ getThemeColor(ThemeColorId::MP_BAR_OUTLINE));
bar->setProgressPalette(Theme::PROG_MP);
}
else
{
- bar->setColor(getThemeColor(Theme::NO_MP_BAR),
- getThemeColor(Theme::NO_MP_BAR_OUTLINE));
+ bar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR),
+ getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE));
bar->setProgressPalette(Theme::PROG_NO_MP);
}
@@ -665,9 +665,9 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
bar->setProgress(50);
if (settings.disableGameModifiers)
- bar->setBackgroundColor(getThemeColor(Theme::STATUSBAR_ON));
+ bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_ON));
else
- bar->setBackgroundColor(getThemeColor(Theme::STATUSBAR_OFF));
+ bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_OFF));
}
void StatusWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 6c48127c5..11d150f30 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -174,15 +174,15 @@ void TradeWindow::setMoney(const int amount)
else
{
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::WARNING)), getThemeColor(
- static_cast<int>(Theme::WARNING_OUTLINE)));
+ static_cast<int>(ThemeColorId::WARNING)), getThemeColor(
+ static_cast<int>(ThemeColorId::WARNING_OUTLINE)));
}
}
else
{
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::LABEL)), getThemeColor(
- static_cast<int>(Theme::LABEL_OUTLINE)));
+ static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
+ static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
mGotMaxMoney = amount;
}
@@ -278,8 +278,8 @@ void TradeWindow::reset()
mMoneyField->setEnabled(true);
mMoneyField->setText("");
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::LABEL)), getThemeColor(
- static_cast<int>(Theme::LABEL_OUTLINE)));
+ static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
+ static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
mAddButton->setEnabled(true);
mMoneyChangeButton->setEnabled(true);
mGotMoney = 0;
@@ -449,8 +449,8 @@ void TradeWindow::clear()
mGotMoney = 0;
mGotMaxMoney = 0;
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::LABEL)), getThemeColor(
- static_cast<int>(Theme::LABEL_OUTLINE)));
+ static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
+ static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
}
void TradeWindow::addAutoItem(const std::string &nick, Item* const item,
diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp
index aa506e75f..eb67a1c0d 100644
--- a/src/particle/textparticle.cpp
+++ b/src/particle/textparticle.cpp
@@ -22,6 +22,8 @@
#include "particle/textparticle.h"
+#include "enums/gui/themecolorid.h"
+
#include "gui/theme.h"
#include "gui/fonts/font.h"
@@ -77,7 +79,7 @@ void TextParticle::draw(Graphics *const graphics,
graphics->setColor(color);
if (mOutline)
{
- const Color &color2 = theme->getColor(Theme::OUTLINE,
+ const Color &color2 = theme->getColor(ThemeColorId::OUTLINE,
static_cast<int>(alpha));
mTextFont->drawString(graphics,
color, color2,
diff --git a/src/text.cpp b/src/text.cpp
index 8dca7d366..ae5ed6afa 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -26,6 +26,8 @@
#include "configuration.h"
#include "textmanager.h"
+#include "enums/gui/themecolorid.h"
+
#include "gui/gui.h"
#include "gui/theme.h"
@@ -57,7 +59,7 @@ Text::Text(const std::string &text,
mText(text),
mColor(color),
mOutlineColor(isSpeech == Speech_true ?
- *color : theme->getColor(Theme::OUTLINE, 255)),
+ *color : theme->getColor(ThemeColorId::OUTLINE, 255)),
mIsSpeech(isSpeech),
mTextChanged(true)
{
diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp
index d63896a47..b7db9d83f 100644
--- a/src/touchmanager.cpp
+++ b/src/touchmanager.cpp
@@ -24,6 +24,8 @@
#include "graphicsvertexes.h"
#include "touchactions.h"
+#include "enums/gui/themecolorid.h"
+
#include "input/mouseinput.h"
#include "gui/gui.h"
@@ -251,8 +253,8 @@ void TouchManager::drawText()
return;
Font *const font = boldFont;
- const Color &color1 = theme->getColor(Theme::TEXT, 255);
- const Color &color2 = theme->getColor(Theme::TEXT_OUTLINE, 255);
+ const Color &color1 = theme->getColor(ThemeColorId::TEXT, 255);
+ const Color &color2 = theme->getColor(ThemeColorId::TEXT_OUTLINE, 255);
FOR_EACH (TouchItemVectorCIter, it, mObjects)
{