diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-24 22:36:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-24 22:36:00 +0300 |
commit | 52039744fa2e5e116548e5236cd8ba5f5d81702a (patch) | |
tree | d367514cfc2a00c0b1f181dbfb5a8c3b0ca5785d /src/gui | |
parent | 35d796b927447760772d2720a221e21fdf9fd10e (diff) | |
download | manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.gz manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.bz2 manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.xz manaverse-52039744fa2e5e116548e5236cd8ba5f5d81702a.zip |
Remove default parameters from widget2.
Diffstat (limited to 'src/gui')
47 files changed, 296 insertions, 253 deletions
diff --git a/src/gui/models/colormodel.cpp b/src/gui/models/colormodel.cpp index 3bbded2e2..e906987f6 100644 --- a/src/gui/models/colormodel.cpp +++ b/src/gui/models/colormodel.cpp @@ -65,8 +65,8 @@ void ColorModel::add(const std::string &name, const Color *const color1, } #define addColor(name, color) \ - model->add(name, &widget->getThemeColor(ThemeColorId::color), \ - &widget->getThemeColor(ThemeColorId::color##_OUTLINE)); + model->add(name, &widget->getThemeColor(ThemeColorId::color, 255U), \ + &widget->getThemeColor(ThemeColorId::color##_OUTLINE, 255U)); ColorModel *ColorModel::createDefault(const Widget2 *const widget) { diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index 299683f6d..9e03e859c 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -79,8 +79,9 @@ void BeingPopup::addLabels(const int fontHeight) { Label *const label = new Label(this, "A"); label->setPosition(0, fontHeight * (f + 1)); - label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + label->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); mLabels.push_back(label); } } @@ -113,14 +114,15 @@ void BeingPopup::show(const int x, const int y, Being *const b) } if (b->isAdvanced()) { - mBeingName->setForegroundColorAll(getThemeColor( - ThemeColorId::PLAYER_ADVANCED), getThemeColor( - ThemeColorId::PLAYER_ADVANCED_OUTLINE)); + mBeingName->setForegroundColorAll( + getThemeColor(ThemeColorId::PLAYER_ADVANCED, 255U), + getThemeColor(ThemeColorId::PLAYER_ADVANCED_OUTLINE, 255U)); } else { - mBeingName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mBeingName->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); } mBeingName->adjustSize(); diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 9c0607a2f..acfe6714b 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -87,32 +87,37 @@ ItemPopup::ItemPopup() : // Item description mItemDesc->setEditable(false); mItemDesc->setPosition(0, fontHeight); - mItemDesc->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mItemDesc->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); // Item effect mItemEffect->setEditable(false); mItemEffect->setPosition(0, 2 * fontHeight); - mItemEffect->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mItemEffect->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); // Item weight mItemWeight->setEditable(false); mItemWeight->setPosition(0, 3 * fontHeight); - mItemWeight->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mItemWeight->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); // Item cards mItemCards->setEditable(false); mItemCards->setPosition(0, 4 * fontHeight); - mItemCards->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mItemCards->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); // Item options mItemOptions->setEditable(false); mItemOptions->setPosition(0, 5 * fontHeight); - mItemOptions->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mItemOptions->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); } void ItemPopup::postInit() @@ -411,8 +416,9 @@ std::string ItemPopup::getOptionsString(const ItemOptionsList *const options) #define caseSetColor(name1, name2) \ case name1: \ { \ - return label->setForegroundColorAll(getThemeColor(name2), \ - getThemeColor(name2##_OUTLINE)); \ + return label->setForegroundColorAll( \ + getThemeColor(name2, 255U), \ + getThemeColor(name2##_OUTLINE, 255U)); \ } void ItemPopup::setLabelColor(Label *label, const ItemDbTypeT type) const @@ -440,9 +446,9 @@ void ItemPopup::setLabelColor(Label *label, caseSetColor(ItemDbType::CARD, ThemeColorId::CARD) default: { - return label->setForegroundColorAll(getThemeColor( - ThemeColorId::UNKNOWN_ITEM), getThemeColor( - ThemeColorId::UNKNOWN_ITEM_OUTLINE)); + return label->setForegroundColorAll( + getThemeColor(ThemeColorId::UNKNOWN_ITEM, 255U), + getThemeColor(ThemeColorId::UNKNOWN_ITEM_OUTLINE, 255U)); } } } diff --git a/src/gui/popups/skillpopup.cpp b/src/gui/popups/skillpopup.cpp index c2a583e30..7272fb316 100644 --- a/src/gui/popups/skillpopup.cpp +++ b/src/gui/popups/skillpopup.cpp @@ -55,30 +55,35 @@ SkillPopup::SkillPopup() : { mSkillName->setFont(boldFont); mSkillName->setPosition(0, 0); - mSkillName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mSkillName->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); const int fontHeight = getFont()->getHeight(); mSkillDesc->setEditable(false); mSkillDesc->setPosition(0, fontHeight); - mSkillDesc->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mSkillDesc->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); mSkillEffect->setEditable(false); mSkillEffect->setPosition(0, 2 * fontHeight); - mSkillEffect->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mSkillEffect->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); mSkillLevel->setEditable(false); mSkillLevel->setPosition(0, 3 * fontHeight); - mSkillLevel->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mSkillLevel->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); mSkillCastType->setEditable(false); mSkillCastType->setPosition(0, 4 * fontHeight); - mSkillCastType->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mSkillCastType->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); } void SkillPopup::postInit() diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp index f4c74cfae..b4da99cc7 100644 --- a/src/gui/popups/speechbubble.cpp +++ b/src/gui/popups/speechbubble.cpp @@ -48,8 +48,9 @@ SpeechBubble::SpeechBubble() : mCaption->setFont(boldFont); mSpeechBox->setOpaque(Opaque_false); - mSpeechBox->setForegroundColorAll(getThemeColor(ThemeColorId::BUBBLE_TEXT), - getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE)); + mSpeechBox->setForegroundColorAll( + getThemeColor(ThemeColorId::BUBBLE_TEXT, 255U), + getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE, 255U)); } void SpeechBubble::postInit() @@ -73,8 +74,9 @@ void SpeechBubble::setText(const std::string &text, const bool showName) if (text == mText && (mCaption->getWidth() <= mSpeechBox->getWidth())) return; - mSpeechBox->setForegroundColorAll(getThemeColor(ThemeColorId::BUBBLE_TEXT), - getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE)); + mSpeechBox->setForegroundColorAll( + getThemeColor(ThemeColorId::BUBBLE_TEXT, 255U), + getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE, 255U)); int width = mCaption->getWidth(); mSpeechBox->clearRows(); diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp index 16169d81e..bb7d5d87a 100644 --- a/src/gui/popups/spellpopup.cpp +++ b/src/gui/popups/spellpopup.cpp @@ -39,10 +39,12 @@ SpellPopup::SpellPopup() : mItemComment(new Label(this)) { mItemName->setFont(boldFont); - mItemName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); - mItemComment->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + mItemName->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); + mItemComment->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); } void SpellPopup::postInit() diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp index 544a37b56..7f0deee2d 100644 --- a/src/gui/popups/statuspopup.cpp +++ b/src/gui/popups/statuspopup.cpp @@ -39,8 +39,9 @@ { \ Label *const label = mLabels[num]; \ label->setPosition(0, y); \ - label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), \ - getThemeColor(ThemeColorId::POPUP_OUTLINE)); \ + label->setForegroundColorAll( \ + getThemeColor(ThemeColorId::POPUP, 255U), \ + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); \ add(label); \ y += fontHeight; \ } diff --git a/src/gui/popups/textpopup.cpp b/src/gui/popups/textpopup.cpp index c8b951aea..6714661b0 100644 --- a/src/gui/popups/textpopup.cpp +++ b/src/gui/popups/textpopup.cpp @@ -47,8 +47,9 @@ void TextPopup::postInit() Label *const label = new Label(this); mText[f] = label; label->setPosition(0, y); - label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), - getThemeColor(ThemeColorId::POPUP_OUTLINE)); + label->setForegroundColorAll( + getThemeColor(ThemeColorId::POPUP, 255U), + getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); add(label); y += fontHeight; } 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); } diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index fa7bb6a63..c62696704 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(ThemeColorId::HIGHLIGHT)), - mBorderColor(getThemeColor(ThemeColorId::BORDER)), - mLabelsColor(getThemeColor(ThemeColorId::LABEL)), - mLabelsColor2(getThemeColor(ThemeColorId::LABEL_OUTLINE)), + mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)), + mBorderColor(getThemeColor(ThemeColorId::BORDER, 255U)), + mLabelsColor(getThemeColor(ThemeColorId::LABEL, 255U)), + mLabelsColor2(getThemeColor(ThemeColorId::LABEL_OUTLINE, 255U)), mSelected(-1), mItemPadding(getOption("itemPadding")), mBoxSize(getOption("boxSize")), diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index cf9e2c3c7..27633f937 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -114,8 +114,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) : mSplit(false), mCompactMode(false) { - mSlotsBar->setColor(getThemeColor(ThemeColorId::SLOTS_BAR), - getThemeColor(ThemeColorId::SLOTS_BAR_OUTLINE)); + mSlotsBar->setColor(getThemeColor(ThemeColorId::SLOTS_BAR, 255U), + getThemeColor(ThemeColorId::SLOTS_BAR_OUTLINE, 255U)); if (inventory != nullptr) { @@ -231,8 +231,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) : mWeightBar = new ProgressBar(this, 0.0F, 100, 0, ProgressColorId::PROG_WEIGHT, "weightprogressbar.xml", "weightprogressbar_fill.xml"); - mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR), - getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE)); + mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR, 255U), + getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE, 255U)); // TRANSLATORS: outfits button tooltip mOutfitButton->setDescription(_("Outfits")); @@ -299,8 +299,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) : mWeightBar = new ProgressBar(this, 0.0F, 100, 0, ProgressColorId::PROG_WEIGHT, "weightprogressbar.xml", "weightprogressbar_fill.xml"); - mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR), - getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE)); + mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR, 255U), + getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE, 255U)); 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 ebc7edd8e..f04c28288 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -196,7 +196,8 @@ ProgressBar *MiniStatusWindow::createBar(const float progress, progress, width, height, backColor, skin, skinFill); bar->setActionEventId(name); bar->setId(description); - bar->setColor(getThemeColor(textColor), getThemeColor(textColor + 1)); + bar->setColor(getThemeColor(textColor, 255U), + getThemeColor(textColor + 1, 255U)); mBars.push_back(bar); mBarNames[name] = bar; return bar; diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index b4d096db4..841e64505 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -120,8 +120,8 @@ StatusWindow::StatusWindow() : 0, ProgressColorId::PROG_HP, "hpprogressbar.xml", "hpprogressbar_fill.xml"); - mHpBar->setColor(getThemeColor(ThemeColorId::HP_BAR), - getThemeColor(ThemeColorId::HP_BAR_OUTLINE)); + mHpBar->setColor(getThemeColor(ThemeColorId::HP_BAR, 255U), + getThemeColor(ThemeColorId::HP_BAR_OUTLINE, 255U)); mHpBar->setSelectable(false); const int64_t maxExp = PlayerInfo::getAttribute64( @@ -135,8 +135,8 @@ StatusWindow::StatusWindow() : 0, ProgressColorId::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml"); - mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR), - getThemeColor(ThemeColorId::XP_BAR_OUTLINE)); + mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR, 255U), + getThemeColor(ThemeColorId::XP_BAR_OUTLINE, 255U)); mXpBar->setSelectable(false); const bool job = serverConfig.getValueBool("showJob", true); @@ -157,13 +157,13 @@ StatusWindow::StatusWindow() : mMpBar->setSelectable(false); if (useMagic) { - mMpBar->setColor(getThemeColor(ThemeColorId::MP_BAR), - getThemeColor(ThemeColorId::MP_BAR_OUTLINE)); + mMpBar->setColor(getThemeColor(ThemeColorId::MP_BAR, 255U), + getThemeColor(ThemeColorId::MP_BAR_OUTLINE, 255U)); } else { - mMpBar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR), - getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE)); + mMpBar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR, 255U), + getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE, 255U)); } place(0, 0, mLvlLabel, 3); @@ -186,8 +186,8 @@ StatusWindow::StatusWindow() : mJobLabel = new Label(this, _("Job:")); mJobBar = new ProgressBar(this, 0.0F, 80, 0, ProgressColorId::PROG_JOB, "jobprogressbar.xml", "jobprogressbar_fill.xml"); - mJobBar->setColor(getThemeColor(ThemeColorId::JOB_BAR), - getThemeColor(ThemeColorId::JOB_BAR_OUTLINE)); + mJobBar->setColor(getThemeColor(ThemeColorId::JOB_BAR, 255U), + getThemeColor(ThemeColorId::JOB_BAR_OUTLINE, 255U)); mJobBar->setSelectable(false); place(3, 0, mJobLvlLabel, 3); @@ -429,14 +429,14 @@ void StatusWindow::updateMPBar(ProgressBar *const bar, if (playerHandler->canUseMagic()) { - bar->setColor(getThemeColor(ThemeColorId::MP_BAR), - getThemeColor(ThemeColorId::MP_BAR_OUTLINE)); + bar->setColor(getThemeColor(ThemeColorId::MP_BAR, 255U), + getThemeColor(ThemeColorId::MP_BAR_OUTLINE, 255U)); bar->setProgressPalette(ProgressColorId::PROG_MP); } else { - bar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR), - getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE)); + bar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR, 255U), + getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE, 255U)); bar->setProgressPalette(ProgressColorId::PROG_NO_MP); } @@ -639,9 +639,15 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar, bar->setProgress(50); if (settings.disableGameModifiers) - bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_ON)); + { + bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_ON, + 255U)); + } else - bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_OFF)); + { + bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_OFF, + 255U)); + } } void StatusWindow::action(const ActionEvent &event) diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 413945660..d11023fdb 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -175,14 +175,14 @@ void TradeWindow::setMoney(const int amount) return; } mMoneyLabel->setForegroundColorAll( - getThemeColor(ThemeColorId::WARNING), - getThemeColor(ThemeColorId::WARNING_OUTLINE)); + getThemeColor(ThemeColorId::WARNING, 255U), + getThemeColor(ThemeColorId::WARNING_OUTLINE, 255U)); } else { mMoneyLabel->setForegroundColorAll( - getThemeColor(ThemeColorId::LABEL), - getThemeColor(ThemeColorId::LABEL_OUTLINE)); + getThemeColor(ThemeColorId::LABEL, 255U), + getThemeColor(ThemeColorId::LABEL_OUTLINE, 255U)); mGotMaxMoney = amount; } @@ -282,8 +282,8 @@ void TradeWindow::reset() mMoneyField->setEnabled(true); mMoneyField->setText(""); mMoneyLabel->setForegroundColorAll( - getThemeColor(ThemeColorId::LABEL), - getThemeColor(ThemeColorId::LABEL_OUTLINE)); + getThemeColor(ThemeColorId::LABEL, 255U), + getThemeColor(ThemeColorId::LABEL_OUTLINE, 255U)); mAddButton->setEnabled(true); mMoneyChangeButton->setEnabled(true); mGotMoney = 0; @@ -467,8 +467,8 @@ void TradeWindow::clear() mGotMoney = 0; mGotMaxMoney = 0; mMoneyLabel->setForegroundColorAll( - getThemeColor(ThemeColorId::LABEL), - getThemeColor(ThemeColorId::LABEL_OUTLINE)); + getThemeColor(ThemeColorId::LABEL, 255U), + getThemeColor(ThemeColorId::LABEL_OUTLINE, 255U)); } void TradeWindow::addAutoItem(const std::string &nick, Item* const item, |