summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-24 22:36:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-24 22:36:00 +0300
commit52039744fa2e5e116548e5236cd8ba5f5d81702a (patch)
treed367514cfc2a00c0b1f181dbfb5a8c3b0ca5785d /src/gui/widgets
parent35d796b927447760772d2720a221e21fdf9fd10e (diff)
downloadmanaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.gz
manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.bz2
manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.xz
manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.zip
Remove default parameters from widget2.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp4
-rw-r--r--src/gui/widgets/browserbox.cpp10
-rw-r--r--src/gui/widgets/browserbox.inc6
-rw-r--r--src/gui/widgets/button.cpp85
-rw-r--r--src/gui/widgets/checkbox.cpp4
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp15
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/guitable.cpp4
-rw-r--r--src/gui/widgets/itemcontainer.cpp9
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp22
-rw-r--r--src/gui/widgets/label.cpp4
-rw-r--r--src/gui/widgets/listbox.cpp11
-rw-r--r--src/gui/widgets/progressbar.cpp5
-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/skillrectanglelistbox.h12
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/staticbrowserbox.cpp10
-rw-r--r--src/gui/widgets/tabs/chat/chattab.h12
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp2
-rw-r--r--src/gui/widgets/tabs/socialguildtab.h13
-rw-r--r--src/gui/widgets/tabs/socialguildtab2.h12
-rw-r--r--src/gui/widgets/tabs/socialpartytab.h13
-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.cpp18
-rw-r--r--src/gui/widgets/widget2.h2
-rw-r--r--src/gui/widgets/window.cpp4
34 files changed, 189 insertions, 172 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 383efb397..1209ae04e 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(ThemeColorId::TEXT);
- mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U);
}
AvatarListBox::~AvatarListBox()
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index df0c9b27d..1f973c85e 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -80,8 +80,8 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
mNewLinePadding(15U),
mItemPadding(0),
mDataWidth(0),
- mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
- mHyperLinkColor(getThemeColor(ThemeColorId::HYPERLINK)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
+ mHyperLinkColor(getThemeColor(ThemeColorId::HYPERLINK, 255U)),
mOpaque(opaque),
mUseLinksAndUserColors(true),
mUseEmotes(true),
@@ -97,7 +97,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
addMouseListener(this);
addWidgetListener(this);
- mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 255U);
if (theme != nullptr)
mSkin = theme->load(skin, "browserbox.xml");
@@ -131,8 +131,8 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
readColor(GRAY);
readColor(BROWN);
- mForegroundColor = getThemeColor(ThemeColorId::BROWSERBOX);
- mForegroundColor2 = getThemeColor(ThemeColorId::BROWSERBOX_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::BROWSERBOX, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::BROWSERBOX_OUTLINE, 255U);
}
BrowserBox::~BrowserBox()
diff --git a/src/gui/widgets/browserbox.inc b/src/gui/widgets/browserbox.inc
index 25c8744c0..c3152d02d 100644
--- a/src/gui/widgets/browserbox.inc
+++ b/src/gui/widgets/browserbox.inc
@@ -24,7 +24,9 @@
#define GUI_WIDGETS_BROWSERBOX_INC
#define readColor(color) \
- mColors[0][ColorName::color] = getThemeColor(ThemeColorId::color); \
- mColors[1][ColorName::color] = getThemeColor(ThemeColorId::color##_OUTLINE)
+ mColors[0][ColorName::color] = getThemeColor(ThemeColorId::color, 255U); \
+ mColors[1][ColorName::color] = getThemeColor( \
+ ThemeColorId::color##_OUTLINE, \
+ 255U)
#endif // GUI_WIDGETS_BROWSERBOX_INC
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 0c2600583..25986ef8a 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -108,15 +108,16 @@ Button::Button(const Widget2 *const widget) :
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- 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)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE, 255U)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED, 255U)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE,
+ 255U)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
mHighlightedColor2(getThemeColor(
- ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
+ ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE, 255U)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED, 255U)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -152,15 +153,16 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- 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)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE, 255U)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED, 255U)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE,
+ 255U)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
mHighlightedColor2(getThemeColor(
- ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
+ ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE, 255U)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED, 255U)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -202,15 +204,16 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- 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)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE, 255U)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED, 255U)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE,
+ 255U)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
mHighlightedColor2(getThemeColor(
- ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
+ ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE, 255U)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED, 255U)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -252,15 +255,16 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- 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)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE, 255U)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED, 255U)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE,
+ 255U)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
mHighlightedColor2(getThemeColor(
- ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
+ ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE, 255U)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED, 255U)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
@@ -302,15 +306,16 @@ Button::Button(const Widget2 *const widget,
mDescription(),
mTextChunk(),
mVertexes2(new ImageCollection),
- 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)),
+ mEnabledColor(getThemeColor(ThemeColorId::BUTTON, 255U)),
+ mEnabledColor2(getThemeColor(ThemeColorId::BUTTON_OUTLINE, 255U)),
+ mDisabledColor(getThemeColor(ThemeColorId::BUTTON_DISABLED, 255U)),
+ mDisabledColor2(getThemeColor(ThemeColorId::BUTTON_DISABLED_OUTLINE,
+ 255U)),
+ mHighlightedColor(getThemeColor(ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
mHighlightedColor2(getThemeColor(
- ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE)),
- mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED)),
- mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE)),
+ ThemeColorId::BUTTON_HIGHLIGHTED_OUTLINE, 255U)),
+ mPressedColor(getThemeColor(ThemeColorId::BUTTON_PRESSED, 255U)),
+ mPressedColor2(getThemeColor(ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
mImages(nullptr),
mImageSet(nullptr),
mAlignment(Graphics::CENTER),
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index ab1227b08..8424c5c0e 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -112,7 +112,7 @@ CheckBox::CheckBox(const Widget2 *const widget,
addMouseListener(this);
addKeyListener(this);
- mForegroundColor2 = getThemeColor(ThemeColorId::CHECKBOX_OUTLINE);
+ mForegroundColor2 = getThemeColor(ThemeColorId::CHECKBOX_OUTLINE, 255U);
if (instances == 0)
{
if (theme != nullptr)
@@ -130,7 +130,7 @@ CheckBox::CheckBox(const Widget2 *const widget,
if (listener != nullptr)
addActionListener(listener);
- mForegroundColor = getThemeColor(ThemeColorId::CHECKBOX);
+ mForegroundColor = getThemeColor(ThemeColorId::CHECKBOX, 255U);
if (mSkin != nullptr)
{
mPadding = mSkin->getPadding();
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index f028dec29..4fe56676b 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -55,7 +55,7 @@ Desktop::Desktop(const Widget2 *const widget) :
mVersionLabel(new StaticBrowserBox(this, Opaque_false,
"browserbox.xml")),
mSkin(nullptr),
- mBackgroundGrayColor(getThemeColor(ThemeColorId::BACKGROUND_GRAY)),
+ mBackgroundGrayColor(getThemeColor(ThemeColorId::BACKGROUND_GRAY, 255U)),
mShowBackground(true)
{
mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 128);
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index cb9eef73d..0a42404a7 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -65,8 +65,8 @@ DropDown::DropDown(const Widget2 *const widget,
FocusListener(),
SelectionListener(),
mPopup(CREATEWIDGETR(PopupList, this, listModel, extended, modal)),
- mShadowColor(getThemeColor(ThemeColorId::DROPDOWN_SHADOW)),
- mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
+ mShadowColor(getThemeColor(ThemeColorId::DROPDOWN_SHADOW, 255U)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
mPadding(1),
mImagePadding(2),
mSpacing(0),
@@ -79,7 +79,7 @@ DropDown::DropDown(const Widget2 *const widget,
{
mAllowLogic = false;
mFrameSize = 2;
- mForegroundColor2 = getThemeColor(ThemeColorId::DROPDOWN_OUTLINE);
+ mForegroundColor2 = getThemeColor(ThemeColorId::DROPDOWN_OUTLINE, 255U);
mPopup->setHeight(100);
@@ -136,10 +136,11 @@ DropDown::DropDown(const Widget2 *const widget,
addFocusListener(this);
adjustHeight();
-// mPopup->setForegroundColorAll(getThemeColor(ThemeColorId::DROPDOWN),
-// getThemeColor(ThemeColorId::DROPDOWN_OUTLINE));
- mForegroundColor = getThemeColor(ThemeColorId::DROPDOWN);
- mForegroundColor2 = getThemeColor(ThemeColorId::DROPDOWN_OUTLINE);
+// mPopup->setForegroundColorAll(getThemeColor(ThemeColorId::DROPDOWN,
+// 255U),
+// getThemeColor(ThemeColorId::DROPDOWN_OUTLINE, 255U));
+ mForegroundColor = getThemeColor(ThemeColorId::DROPDOWN, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::DROPDOWN_OUTLINE, 255U);
if (!eventId.empty())
setActionEventId(eventId);
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index 37acf7263..d5213e0d2 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -79,8 +79,8 @@ void EmoteShortcutContainer::setWidget2(const Widget2 *restrict const widget)
restrict2
{
Widget2::setWidget2(widget);
- mForegroundColor = getThemeColor(ThemeColorId::TEXT);
- mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U);
}
void EmoteShortcutContainer::draw(Graphics *restrict graphics) restrict2
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 4a0f88246..082d3445c 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -49,7 +49,7 @@ GuiTable::GuiTable(const Widget2 *const widget,
mModel(nullptr),
mTopWidget(nullptr),
mActionListeners2(),
- mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
mSelectedRow(-1),
mSelectedColumn(-1),
mLinewiseMode(false),
@@ -58,7 +58,7 @@ GuiTable::GuiTable(const Widget2 *const widget,
mSelectableGui(true)
{
mAllowLogic = false;
- mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 255U);
setModel(initial_model);
setFocusable(true);
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 6b073f741..fa9fc957e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -238,10 +238,11 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mShowMatrix(nullptr),
mSkin(theme != nullptr ? theme->load("itemcontainer.xml", "") : nullptr),
mVertexes(new ImageCollection),
- mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE)),
+ mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED, 255U)),
+ mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE, 255U)),
+ mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED, 255U)),
+ mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE,
+ 255U)),
mSelectionListeners(),
mGridColumns(1),
mGridRows(1),
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 9f667caba..adfa24527 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -58,10 +58,11 @@ ItemShortcutContainer::ItemShortcutContainer(Widget2 *const widget,
ShortcutContainer(widget),
mItemClicked(false),
mNumber(number),
- mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE))
+ mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED, 255U)),
+ mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE, 255U)),
+ mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED, 255U)),
+ mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE,
+ 255U))
{
mMaxItems = ItemShortcut::getItemCount();
}
@@ -73,12 +74,13 @@ ItemShortcutContainer::~ItemShortcutContainer()
void ItemShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- 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);
+ mEquipedColor = getThemeColor(ThemeColorId::ITEM_EQUIPPED, 255U);
+ mEquipedColor2 = getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE, 255U);
+ mUnEquipedColor = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED, 255U);
+ mUnEquipedColor2 = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE,
+ 255U);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U);
}
void ItemShortcutContainer::draw(Graphics *const graphics)
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index aeacddbdb..c4d8d14f6 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -126,8 +126,8 @@ void Label::init()
{
addMouseListener(this);
mAllowLogic = false;
- mForegroundColor = getThemeColor(ThemeColorId::LABEL);
- mForegroundColor2 = getThemeColor(ThemeColorId::LABEL_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::LABEL, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::LABEL_OUTLINE, 255U);
if (mInstances == 0)
{
if (theme != nullptr)
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 0bf590f6b..eabf26e19 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -95,10 +95,11 @@ ListBox::ListBox(const Widget2 *const widget,
mListModel(listModel),
mWrappingEnabled(false),
mSelectionListeners(),
- mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
- mForegroundSelectedColor(getThemeColor(ThemeColorId::LISTBOX_SELECTED)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
+ mForegroundSelectedColor(getThemeColor(ThemeColorId::LISTBOX_SELECTED,
+ 255U)),
mForegroundSelectedColor2(getThemeColor(
- ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
+ ThemeColorId::LISTBOX_SELECTED_OUTLINE, 255U)),
mOldSelected(-1),
mPadding(0),
mPressedIndex(-2),
@@ -113,8 +114,8 @@ ListBox::ListBox(const Widget2 *const widget,
addMouseListener(this);
addKeyListener(this);
- mForegroundColor = getThemeColor(ThemeColorId::LISTBOX);
- mForegroundColor2 = getThemeColor(ThemeColorId::LISTBOX_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::LISTBOX, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::LISTBOX_OUTLINE, 255U);
if (theme != nullptr)
mSkin = theme->load(skin, "listbox.xml");
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 7299140c6..f1889e979 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -70,13 +70,14 @@ ProgressBar::ProgressBar(const Widget2 *const widget,
? backColor : ProgressColorId::PROG_HP,
mProgress);
mBackgroundColorToGo = mBackgroundColor;
- mForegroundColor2 = getThemeColor(ThemeColorId::PROGRESS_BAR_OUTLINE);
+ mForegroundColor2 = getThemeColor(ThemeColorId::PROGRESS_BAR_OUTLINE,
+ 255U);
// The progress value is directly set at load time:
if (mProgress > 1.0F || mProgress < 0.0F)
mProgress = 1.0F;
- mForegroundColor = getThemeColor(ThemeColorId::PROGRESS_BAR);
+ mForegroundColor = getThemeColor(ThemeColorId::PROGRESS_BAR, 255U);
addWidgetListener(this);
setSize(width, height);
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 71b7171ae..c2e9ad505 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -115,8 +115,8 @@ RadioButton::RadioButton(const Widget2 *const widget,
addMouseListener(this);
addKeyListener(this);
- mForegroundColor = getThemeColor(ThemeColorId::RADIOBUTTON);
- mForegroundColor2 = getThemeColor(ThemeColorId::RADIOBUTTON_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::RADIOBUTTON, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::RADIOBUTTON_OUTLINE, 255U);
if (instances == 0)
{
if (theme != nullptr)
diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h
index 20d019f8d..1deeac640 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(
- ThemeColorId::SERVER_VERSION_NOT_SUPPORTED)),
+ ThemeColorId::SERVER_VERSION_NOT_SUPPORTED, 255U)),
mNotSupportedColor2(getThemeColor(
- ThemeColorId::SERVER_VERSION_NOT_SUPPORTED_OUTLINE))
+ ThemeColorId::SERVER_VERSION_NOT_SUPPORTED_OUTLINE, 255U))
{
- mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT, 255U);
}
A_DELETE_COPY(ServersListBox)
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index ea3f46e87..0f527c3c9 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -54,15 +54,15 @@ ShopListBox::ShopListBox(const Widget2 *const widget,
ListBox(widget, listModel, "shoplistbox.xml"),
mPlayerMoney(0),
mShopItems(nullptr),
- mWarningColor(getThemeColor(ThemeColorId::SHOP_WARNING)),
+ mWarningColor(getThemeColor(ThemeColorId::SHOP_WARNING, 255U)),
mType(type),
mPriceCheck(true),
mProtectItems(false)
{
mRowHeight = getFont()->getHeight();
- mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
- mForegroundColor = getThemeColor(ThemeColorId::LISTBOX);
- mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT, 255U);
+ mForegroundColor = getThemeColor(ThemeColorId::LISTBOX, 255U);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 255U);
}
ShopListBox::ShopListBox(const Widget2 *const widget,
@@ -72,15 +72,15 @@ ShopListBox::ShopListBox(const Widget2 *const widget,
ListBox(widget, listModel, "shoplistbox.xml"),
mPlayerMoney(0),
mShopItems(shopListModel),
- mWarningColor(getThemeColor(ThemeColorId::SHOP_WARNING)),
+ mWarningColor(getThemeColor(ThemeColorId::SHOP_WARNING, 255U)),
mType(type),
mPriceCheck(true),
mProtectItems(false)
{
mRowHeight = std::max(getFont()->getHeight(), ITEM_ICON_SIZE);
- mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
- mForegroundColor = getThemeColor(ThemeColorId::LISTBOX);
- mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT, 255U);
+ mForegroundColor = getThemeColor(ThemeColorId::LISTBOX, 255U);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 255U);
}
void ShopListBox::setPlayersMoney(const int money)
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index a2b90514d..72f039e4b 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -55,8 +55,8 @@ ShortcutContainer::ShortcutContainer(Widget2 *const widget) :
addMouseListener(this);
addWidgetListener(this);
- mForegroundColor = getThemeColor(ThemeColorId::TEXT);
- mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U);
mBackgroundImg = Theme::getImageFromThemeXml(
"item_shortcut_background.xml", "background.xml");
diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h
index 65f4c82b7..f09e7d4bb 100644
--- a/src/gui/widgets/skilllistbox.h
+++ b/src/gui/widgets/skilllistbox.h
@@ -54,16 +54,16 @@ class SkillListBox final : public ListBox
SkillModel *const model) :
ListBox(widget, model, "skilllistbox.xml"),
mModel(model),
- mTextColor(getThemeColor(ThemeColorId::TEXT)),
- mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE)),
- mCooldownColor(getThemeColor(ThemeColorId::SKILL_COOLDOWN)),
+ mTextColor(getThemeColor(ThemeColorId::TEXT, 255U)),
+ mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U)),
+ mCooldownColor(getThemeColor(ThemeColorId::SKILL_COOLDOWN, 255U)),
mTextPadding(mSkin != nullptr ?
mSkin->getOption("textPadding", 34) : 34),
mSpacing(mSkin != nullptr ? mSkin->getOption("spacing", 0) : 0),
mSkillClicked(false)
{
mRowHeight = getFont()->getHeight() * 2 + mSpacing + 2 * mPadding;
- mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
+ mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT, 255U);
if (mRowHeight < 34)
mRowHeight = 34;
diff --git a/src/gui/widgets/skillrectanglelistbox.h b/src/gui/widgets/skillrectanglelistbox.h
index 6ba51be51..86ce542c6 100644
--- a/src/gui/widgets/skillrectanglelistbox.h
+++ b/src/gui/widgets/skillrectanglelistbox.h
@@ -52,14 +52,14 @@ class SkillRectangleListBox final : public Widget,
SkillModel *const model) :
Widget(widget),
MouseListener(),
- mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
- mTextColor(getThemeColor(ThemeColorId::TEXT)),
- mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE)),
- mCooldownColor(getThemeColor(ThemeColorId::SKILL_COOLDOWN)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
+ mTextColor(getThemeColor(ThemeColorId::TEXT, 255U)),
+ mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U)),
+ mCooldownColor(getThemeColor(ThemeColorId::SKILL_COOLDOWN, 255U)),
mForegroundSelectedColor(getThemeColor(
- ThemeColorId::LISTBOX_SELECTED)),
+ ThemeColorId::LISTBOX_SELECTED, 255U)),
mForegroundSelectedColor2(getThemeColor(
- ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
+ ThemeColorId::LISTBOX_SELECTED_OUTLINE, 255U)),
mModel(model),
mSkin(nullptr),
mSelected(-1),
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index ffa23ffa1..6e2f7f866 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -59,8 +59,8 @@ SpellShortcutContainer::~SpellShortcutContainer()
void SpellShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- mForegroundColor = getThemeColor(ThemeColorId::TEXT);
- mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXT, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U);
}
void SpellShortcutContainer::draw(Graphics *const graphics)
diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp
index 38e936579..d602160b6 100644
--- a/src/gui/widgets/staticbrowserbox.cpp
+++ b/src/gui/widgets/staticbrowserbox.cpp
@@ -76,8 +76,8 @@ StaticBrowserBox::StaticBrowserBox(const Widget2 *const widget,
mPadding(0),
mNewLinePadding(15U),
mItemPadding(0),
- mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
- mHyperLinkColor(getThemeColor(ThemeColorId::HYPERLINK)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
+ mHyperLinkColor(getThemeColor(ThemeColorId::HYPERLINK, 255U)),
mOpaque(opaque),
mUseLinksAndUserColors(true),
mUseEmotes(true),
@@ -92,7 +92,7 @@ StaticBrowserBox::StaticBrowserBox(const Widget2 *const widget,
setFocusable(true);
addMouseListener(this);
- mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 255U);
if (theme != nullptr)
mSkin = theme->load(skin, "browserbox.xml");
@@ -126,8 +126,8 @@ StaticBrowserBox::StaticBrowserBox(const Widget2 *const widget,
readColor(GRAY);
readColor(BROWN);
- mForegroundColor = getThemeColor(ThemeColorId::BROWSERBOX);
- mForegroundColor2 = getThemeColor(ThemeColorId::BROWSERBOX_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::BROWSERBOX, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::BROWSERBOX_OUTLINE, 255U);
}
StaticBrowserBox::~StaticBrowserBox()
diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h
index 6e51ca172..aeefe43db 100644
--- a/src/gui/widgets/tabs/chat/chattab.h
+++ b/src/gui/widgets/tabs/chat/chattab.h
@@ -48,12 +48,12 @@ class ScrollArea;
}
#define setTabColors(name) \
- setTabColor(&getThemeColor(name), \
- &getThemeColor(name##_OUTLINE)); \
- setHighlightedTabColor(&getThemeColor(name##_HIGHLIGHTED), \
- &getThemeColor(name##_HIGHLIGHTED_OUTLINE)); \
- setSelectedTabColor(&getThemeColor(name##_SELECTED), \
- &getThemeColor(name##_SELECTED_OUTLINE))
+ setTabColor(&getThemeColor(name, 255U), \
+ &getThemeColor(name##_OUTLINE, 255U)); \
+ setHighlightedTabColor(&getThemeColor(name##_HIGHLIGHTED, 255U), \
+ &getThemeColor(name##_HIGHLIGHTED_OUTLINE, 255U)); \
+ setSelectedTabColor(&getThemeColor(name##_SELECTED, 255U), \
+ &getThemeColor(name##_SELECTED_OUTLINE, 255U))
/**
* A tab for the chat window. This is special to ease chat handling.
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index 095277a75..d81774694 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -89,7 +89,7 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
mPlayerTableTitleModel->fixColumnWidth(RELATION_CHOICE_COLUMN,
RELATION_CHOICE_COLUMN_WIDTH);
mPlayerTitleTable->setBackgroundColor(getThemeColor(
- ThemeColorId::TABLE_BACKGROUND));
+ ThemeColorId::TABLE_BACKGROUND, 255U));
mPlayerTitleTable->setSelectableGui(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 433823ff4..a42ad1dad 100644
--- a/src/gui/widgets/tabs/socialguildtab.h
+++ b/src/gui/widgets/tabs/socialguildtab.h
@@ -49,15 +49,16 @@ class SocialGuildTab final : public SocialTab,
// TRANSLATORS: tab in social window
setCaption(_("Guild"));
- setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB),
- &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE));
+ setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB, 255U),
+ &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE, 255U));
setHighlightedTabColor(&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED, 255U),
+ &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE, 255U));
setSelectedTabColor(&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED, 255U),
&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE, 255U));
createControls(guild, showBackground);
mMenuAction = "guild";
diff --git a/src/gui/widgets/tabs/socialguildtab2.h b/src/gui/widgets/tabs/socialguildtab2.h
index ff8544232..c0dc123a4 100644
--- a/src/gui/widgets/tabs/socialguildtab2.h
+++ b/src/gui/widgets/tabs/socialguildtab2.h
@@ -48,16 +48,16 @@ class SocialGuildTab2 final : public SocialTab,
// TRANSLATORS: tab in social window
setCaption(_("Guild"));
- setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB),
- &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE));
+ setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB, 255U),
+ &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE, 255U));
setHighlightedTabColor(&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED),
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED, 255U),
&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE, 255U));
setSelectedTabColor(&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED, 255U),
&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE, 255U));
createControls(guild, showBackground);
mMenuAction = "guild";
diff --git a/src/gui/widgets/tabs/socialpartytab.h b/src/gui/widgets/tabs/socialpartytab.h
index f151f9e62..17fcfd3f1 100644
--- a/src/gui/widgets/tabs/socialpartytab.h
+++ b/src/gui/widgets/tabs/socialpartytab.h
@@ -51,15 +51,16 @@ class SocialPartyTab final : public SocialTab,
// TRANSLATORS: tab in social window
setCaption(_("Party"));
- setTabColor(&getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB),
- &getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB_OUTLINE));
+ setTabColor(&getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB, 255U),
+ &getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB_OUTLINE, 255U));
setHighlightedTabColor(&getThemeColor(
- ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
- ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
+ ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED, 255U),
+ &getThemeColor(
+ ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE, 255U));
setSelectedTabColor(&getThemeColor(
- ThemeColorId::PARTY_SOCIAL_TAB_SELECTED),
+ ThemeColorId::PARTY_SOCIAL_TAB_SELECTED, 255U),
&getThemeColor(
- ThemeColorId::PARTY_SOCIAL_TAB_SELECTED_OUTLINE));
+ ThemeColorId::PARTY_SOCIAL_TAB_SELECTED_OUTLINE, 255U));
createControls(party, showBackground);
mMenuAction = "party";
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 36c2a3f40..88fe5d54f 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -105,19 +105,19 @@ Tab::Tab(const Widget2 *const widget) :
WidgetListener(),
mLabel(new Label(this)),
mTabbedArea(nullptr),
- mTabColor(&getThemeColor(ThemeColorId::TAB)),
- mTabOutlineColor(&getThemeColor(ThemeColorId::TAB_OUTLINE)),
- mTabHighlightedColor(&getThemeColor(ThemeColorId::TAB_HIGHLIGHTED)),
+ mTabColor(&getThemeColor(ThemeColorId::TAB, 255U)),
+ mTabOutlineColor(&getThemeColor(ThemeColorId::TAB_OUTLINE, 255U)),
+ mTabHighlightedColor(&getThemeColor(ThemeColorId::TAB_HIGHLIGHTED, 255U)),
mTabHighlightedOutlineColor(&getThemeColor(
- ThemeColorId::TAB_HIGHLIGHTED_OUTLINE)),
- mTabSelectedColor(&getThemeColor(ThemeColorId::TAB_SELECTED)),
+ ThemeColorId::TAB_HIGHLIGHTED_OUTLINE, 255U)),
+ mTabSelectedColor(&getThemeColor(ThemeColorId::TAB_SELECTED, 255U)),
mTabSelectedOutlineColor(&getThemeColor(
- ThemeColorId::TAB_SELECTED_OUTLINE)),
- mFlashColor(&getThemeColor(ThemeColorId::TAB_FLASH)),
- mFlashOutlineColor(&getThemeColor(ThemeColorId::TAB_FLASH_OUTLINE)),
- mPlayerFlashColor(&getThemeColor(ThemeColorId::TAB_PLAYER_FLASH)),
+ ThemeColorId::TAB_SELECTED_OUTLINE, 255U)),
+ mFlashColor(&getThemeColor(ThemeColorId::TAB_FLASH, 255U)),
+ mFlashOutlineColor(&getThemeColor(ThemeColorId::TAB_FLASH_OUTLINE, 255U)),
+ mPlayerFlashColor(&getThemeColor(ThemeColorId::TAB_PLAYER_FLASH, 255U)),
mPlayerFlashOutlineColor(&getThemeColor(
- ThemeColorId::TAB_PLAYER_FLASH_OUTLINE)),
+ ThemeColorId::TAB_PLAYER_FLASH_OUTLINE, 255U)),
mFlash(0),
mVertexes(new ImageCollection),
mImage(nullptr),
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 5d1696835..307587195 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(ThemeColorId::TEXTBOX);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXTBOX, 255U);
setOpaque(Opaque_false);
setFrameSize(0);
}
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index e536b5b13..8af2109d8 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -120,7 +120,7 @@ TextField::TextField(const Widget2 *restrict const widget,
mTextChunk(),
mCaretPosition(0),
mXScroll(0),
- mCaretColor(&getThemeColor(ThemeColorId::CARET)),
+ mCaretColor(&getThemeColor(ThemeColorId::CARET, 255U)),
mMinimum(0),
mMaximum(0),
mLastEventPaste(0),
@@ -137,8 +137,8 @@ TextField::TextField(const Widget2 *restrict const widget,
addKeyListener(this);
setFrameSize(2);
- mForegroundColor = getThemeColor(ThemeColorId::TEXTFIELD);
- mForegroundColor2 = getThemeColor(ThemeColorId::TEXTFIELD_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::TEXTFIELD, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::TEXTFIELD_OUTLINE, 255U);
addFocusListener(this);
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 53f84badc..4d90f1f9c 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -42,9 +42,9 @@ TextPreview::TextPreview(const Widget2 *const widget,
Widget(widget),
mFont(gui->getFont()),
mText(text),
- mTextColor(&getThemeColor(ThemeColorId::TEXT)),
- mTextColor2(&getThemeColor(ThemeColorId::TEXT_OUTLINE)),
- mBGColor(&getThemeColor(ThemeColorId::BACKGROUND)),
+ mTextColor(&getThemeColor(ThemeColorId::TEXT, 255U)),
+ mTextColor2(&getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U)),
+ mBGColor(&getThemeColor(ThemeColorId::BACKGROUND, 255U)),
mTextBGColor(nullptr),
mPadding(0),
mTextAlpha(false),
@@ -120,7 +120,7 @@ void TextPreview::draw(Graphics *const graphics)
if (mOutline && mTextColor != mTextColor2)
{
- const Color &color2 = getThemeColor(ThemeColorId::OUTLINE, 255);
+ const Color &color2 = getThemeColor(ThemeColorId::OUTLINE, 255U);
mFont->drawString(graphics,
color1,
color2,
diff --git a/src/gui/widgets/virtshortcutcontainer.cpp b/src/gui/widgets/virtshortcutcontainer.cpp
index 7d333bdbb..f6172595c 100644
--- a/src/gui/widgets/virtshortcutcontainer.cpp
+++ b/src/gui/widgets/virtshortcutcontainer.cpp
@@ -46,10 +46,11 @@ VirtShortcutContainer::VirtShortcutContainer(Widget2 *const widget,
ShortcutBase *const shortcut) :
ShortcutContainer(widget),
mItemClicked(false),
- mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE)),
+ mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED, 255U)),
+ mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE, 255U)),
+ mUnEquipedColor(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED, 255U)),
+ mUnEquipedColor2(getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE,
+ 255U)),
mShortcut(shortcut)
{
if (mShortcut != nullptr)
@@ -65,10 +66,11 @@ VirtShortcutContainer::~VirtShortcutContainer()
void VirtShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
- mEquipedColor = getThemeColor(ThemeColorId::ITEM_EQUIPPED);
- mEquipedColor2 = getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE);
- mUnEquipedColor = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED);
- mUnEquipedColor2 = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE);
+ mEquipedColor = getThemeColor(ThemeColorId::ITEM_EQUIPPED, 255U);
+ mEquipedColor2 = getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE, 255U);
+ mUnEquipedColor = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED, 255U);
+ mUnEquipedColor2 = getThemeColor(ThemeColorId::ITEM_NOT_EQUIPPED_OUTLINE,
+ 255U);
}
void VirtShortcutContainer::draw(Graphics *const graphics)
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index 12103e317..63d6b63e6 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -42,7 +42,7 @@ class Widget2 notfinal
}
inline const Color &getThemeColor(const ThemeColorIdT type,
- const unsigned int alpha = 255U)
+ const unsigned int alpha)
const A_WARN_UNUSED A_INLINE
{
return theme->getColor(type + mPaletteOffset, alpha);
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index b192bad35..3b34a7347 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -233,8 +233,8 @@ Window::Window(const std::string &caption,
setVisible(Visible_false, false);
addWidgetListener(this);
- mForegroundColor = getThemeColor(ThemeColorId::WINDOW);
- mForegroundColor2 = getThemeColor(ThemeColorId::WINDOW_OUTLINE);
+ mForegroundColor = getThemeColor(ThemeColorId::WINDOW, 255U);
+ mForegroundColor2 = getThemeColor(ThemeColorId::WINDOW_OUTLINE, 255U);
setPalette(childPalette);
}