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/windows | |
parent | 35d796b927447760772d2720a221e21fdf9fd10e (diff) | |
download | manaplus-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.gz manaplus-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.bz2 manaplus-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.xz manaplus-52039744fa2e5e116548e5236cd8ba5f5d81702a.zip |
Remove default parameters from widget2.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 38 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.cpp | 16 |
5 files changed, 42 insertions, 35 deletions
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, |