summaryrefslogtreecommitdiff
path: root/src/gui/widgets
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 /src/gui/widgets
parentf57b683f8f9909ba7787c33a4953869a2ce04a5c (diff)
downloadmanaverse-07121956f882dce22235868a25e0c2df96fb828a.tar.gz
manaverse-07121956f882dce22235868a25e0c2df96fb828a.tar.bz2
manaverse-07121956f882dce22235868a25e0c2df96fb828a.tar.xz
manaverse-07121956f882dce22235868a25e0c2df96fb828a.zip
Move theme colors enum into separate file.
Diffstat (limited to 'src/gui/widgets')
-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
37 files changed, 167 insertions, 165 deletions
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);
}