summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 15:04:01 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 15:08:24 +0300
commit07121956f882dce22235868a25e0c2df96fb828a (patch)
tree5078133e95d7b55c4811e09c9dc4f53261e62fe9 /src/gui/windows
parentf57b683f8f9909ba7787c33a4953869a2ce04a5c (diff)
downloadmanaverse-07121956f882dce22235868a25e0c2df96fb828a.tar.gz
manaverse-07121956f882dce22235868a25e0c2df96fb828a.tar.bz2
manaverse-07121956f882dce22235868a25e0c2df96fb828a.tar.xz
manaverse-07121956f882dce22235868a25e0c2df96fb828a.zip
Move theme colors enum into separate file.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/equipmentwindow.cpp8
-rw-r--r--src/gui/windows/inventorywindow.cpp12
-rw-r--r--src/gui/windows/ministatuswindow.cpp18
-rw-r--r--src/gui/windows/outfitwindow.cpp4
-rw-r--r--src/gui/windows/statuswindow.cpp32
-rw-r--r--src/gui/windows/tradewindow.cpp16
6 files changed, 45 insertions, 45 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index a847c3fff..9c6602176 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -79,10 +79,10 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
mVertexes(new ImageCollection),
mPages(),
mTabs(nullptr),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
- mBorderColor(getThemeColor(Theme::BORDER)),
- mLabelsColor(getThemeColor(Theme::LABEL)),
- mLabelsColor2(getThemeColor(Theme::LABEL_OUTLINE)),
+ mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
+ mBorderColor(getThemeColor(ThemeColorId::BORDER)),
+ mLabelsColor(getThemeColor(ThemeColorId::LABEL)),
+ mLabelsColor2(getThemeColor(ThemeColorId::LABEL_OUTLINE)),
mSelected(-1),
mItemPadding(getOption("itemPadding")),
mBoxSize(getOption("boxSize")),
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 63cde64f7..8b46f5e55 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -106,8 +106,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mSplit(false),
mCompactMode(false)
{
- mSlotsBar->setColor(getThemeColor(Theme::SLOTS_BAR),
- getThemeColor(Theme::SLOTS_BAR_OUTLINE));
+ mSlotsBar->setColor(getThemeColor(ThemeColorId::SLOTS_BAR),
+ getThemeColor(ThemeColorId::SLOTS_BAR_OUTLINE));
if (inventory)
{
@@ -217,8 +217,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
- mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
- getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
+ mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR),
+ getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE));
// TRANSLATORS: outfits button tooltip
mOutfitButton->setDescription(_("Outfits"));
@@ -286,8 +286,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
- mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
- getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
+ mWeightBar->setColor(getThemeColor(ThemeColorId::WEIGHT_BAR),
+ getThemeColor(ThemeColorId::WEIGHT_BAR_OUTLINE));
mSlotsBarCell = &place(3, 0, mSlotsBar, 3);
mSortDropDownCell = &place(6, 0, mSortDropDown, 1);
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 250258ca7..4af6467fb 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -67,12 +67,12 @@ MiniStatusWindow::MiniStatusWindow() :
mBarNames(),
mIcons(),
// TRANSLATORS: status bar name
- mHpBar(createBar(0, 100, 0, Theme::HP_BAR, Theme::PROG_HP,
+ mHpBar(createBar(0, 100, 0, ThemeColorId::HP_BAR, Theme::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml",
"hp bar", _("health bar"))),
mMpBar(gameHandler->canUseMagicBar()
? createBar(0, 100, 0, playerHandler->canUseMagic()
- ? Theme::MP_BAR : Theme::NO_MP_BAR,
+ ? ThemeColorId::MP_BAR : ThemeColorId::NO_MP_BAR,
playerHandler->canUseMagic()
? Theme::PROG_MP : Theme::PROG_NO_MP,
playerHandler->canUseMagic()
@@ -81,31 +81,31 @@ MiniStatusWindow::MiniStatusWindow() :
? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml",
// TRANSLATORS: status bar name
"mp bar", _("mana bar")) : nullptr),
- mXpBar(createBar(0, 100, 0, Theme::XP_BAR, Theme::PROG_EXP,
+ mXpBar(createBar(0, 100, 0, ThemeColorId::XP_BAR, Theme::PROG_EXP,
"xpprogressbar.xml", "xpprogressbar_fill.xml",
// TRANSLATORS: status bar name
"xp bar", _("experience bar"))),
mJobBar(nullptr),
- mWeightBar(createBar(0, 140, 0, Theme::WEIGHT_BAR, Theme::PROG_WEIGHT,
+ mWeightBar(createBar(0, 140, 0, ThemeColorId::WEIGHT_BAR, Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml",
// TRANSLATORS: status bar name
"weight bar", _("weight bar"))),
mInvSlotsBar(createBar(0, 45, 0,
- Theme::SLOTS_BAR, Theme::PROG_INVY_SLOTS,
+ ThemeColorId::SLOTS_BAR, Theme::PROG_INVY_SLOTS,
"slotsprogressbar.xml", "slotsprogressbar_fill.xml",
"inventory slots bar",
// TRANSLATORS: status bar name
_("inventory slots bar"))),
- mMoneyBar(createBar(0, 130, 0, Theme::MONEY_BAR, Theme::PROG_MONEY,
+ mMoneyBar(createBar(0, 130, 0, ThemeColorId::MONEY_BAR, Theme::PROG_MONEY,
"moneyprogressbar.xml", "moneyprogressbar_fill.xml",
// TRANSLATORS: status bar name
"money bar", _("money bar"))),
- mArrowsBar(createBar(0, 50, 0, Theme::ARROWS_BAR, Theme::PROG_ARROWS,
+ mArrowsBar(createBar(0, 50, 0, ThemeColorId::ARROWS_BAR, Theme::PROG_ARROWS,
"arrowsprogressbar.xml", "arrowsprogressbar_fill.xml",
// TRANSLATORS: status bar name
"arrows bar", _("arrows bar"))),
mStatusBar(createBar(100, (config.getIntValue("fontSize") > 16
- ? 250 : 165), 0, Theme::STATUS_BAR, Theme::PROG_STATUS,
+ ? 250 : 165), 0, ThemeColorId::STATUS_BAR, Theme::PROG_STATUS,
"statusprogressbar.xml", "statusprogressbar_fill.xml",
// TRANSLATORS: status bar name
"status bar", _("status bar"))),
@@ -128,7 +128,7 @@ MiniStatusWindow::MiniStatusWindow() :
if (job)
{
- mJobBar = createBar(0, 100, 0, Theme::JOB_BAR, Theme::PROG_JOB,
+ mJobBar = createBar(0, 100, 0, ThemeColorId::JOB_BAR, Theme::PROG_JOB,
// TRANSLATORS: status bar name
"jobprogressbar.xml", "jobprogressbar_fill.xml",
"job bar", _("job bar"));
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index e1f2c3b42..b3a17915d 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -71,7 +71,7 @@ OutfitWindow::OutfitWindow() :
// TRANSLATORS: outfits window label
mKeyLabel(new Label(this, strprintf(_("Key: %s"),
keyName(0).c_str()))),
- mBorderColor(getThemeColor(Theme::BORDER, 64)),
+ mBorderColor(getThemeColor(ThemeColorId::BORDER, 64)),
mCurrentOutfit(0),
mBoxWidth(33),
mBoxHeight(33),
@@ -88,7 +88,7 @@ OutfitWindow::OutfitWindow() :
setCloseButton(true);
setStickyButtonLock(true);
- mBackgroundColor = getThemeColor(Theme::BACKGROUND, 32);
+ mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND, 32);
setDefaultSize(250, 400, 150, 290);
setMinWidth(145);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index fb28aacb7..5e5dcff33 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -113,16 +113,16 @@ StatusWindow::StatusWindow() :
mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
Attributes::HP)) / static_cast<float>(max), 80, 0, Theme::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml");
- mHpBar->setColor(getThemeColor(Theme::HP_BAR),
- getThemeColor(Theme::HP_BAR_OUTLINE));
+ mHpBar->setColor(getThemeColor(ThemeColorId::HP_BAR),
+ getThemeColor(ThemeColorId::HP_BAR_OUTLINE));
max = PlayerInfo::getAttribute(Attributes::EXP_NEEDED);
mXpBar = new ProgressBar(this, max ?
static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP))
/ static_cast<float>(max) : static_cast<float>(0), 80, 0,
Theme::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml");
- mXpBar->setColor(getThemeColor(Theme::XP_BAR),
- getThemeColor(Theme::XP_BAR_OUTLINE));
+ mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR),
+ getThemeColor(ThemeColorId::XP_BAR_OUTLINE));
const bool magicBar = gameHandler->canUseMagicBar();
const bool job = serverConfig.getValueBool("showJob", true);
@@ -141,13 +141,13 @@ StatusWindow::StatusWindow() :
useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
{
- mMpBar->setColor(getThemeColor(Theme::MP_BAR),
- getThemeColor(Theme::MP_BAR_OUTLINE));
+ mMpBar->setColor(getThemeColor(ThemeColorId::MP_BAR),
+ getThemeColor(ThemeColorId::MP_BAR_OUTLINE));
}
else
{
- mMpBar->setColor(getThemeColor(Theme::NO_MP_BAR),
- getThemeColor(Theme::NO_MP_BAR_OUTLINE));
+ mMpBar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR),
+ getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE));
}
}
else
@@ -179,8 +179,8 @@ StatusWindow::StatusWindow() :
mJobLabel = new Label(this, _("Job:"));
mJobBar = new ProgressBar(this, 0.0F, 80, 0, Theme::PROG_JOB,
"jobprogressbar.xml", "jobprogressbar_fill.xml");
- mJobBar->setColor(getThemeColor(Theme::JOB_BAR),
- getThemeColor(Theme::JOB_BAR_OUTLINE));
+ mJobBar->setColor(getThemeColor(ThemeColorId::JOB_BAR),
+ getThemeColor(ThemeColorId::JOB_BAR_OUTLINE));
place(3, 0, mJobLvlLabel, 3);
place(5, 2, mJobLabel).setPadding(3);
@@ -466,14 +466,14 @@ void StatusWindow::updateMPBar(ProgressBar *const bar,
if (playerHandler->canUseMagic())
{
- bar->setColor(getThemeColor(Theme::MP_BAR),
- getThemeColor(Theme::MP_BAR_OUTLINE));
+ bar->setColor(getThemeColor(ThemeColorId::MP_BAR),
+ getThemeColor(ThemeColorId::MP_BAR_OUTLINE));
bar->setProgressPalette(Theme::PROG_MP);
}
else
{
- bar->setColor(getThemeColor(Theme::NO_MP_BAR),
- getThemeColor(Theme::NO_MP_BAR_OUTLINE));
+ bar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR),
+ getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE));
bar->setProgressPalette(Theme::PROG_NO_MP);
}
@@ -665,9 +665,9 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
bar->setProgress(50);
if (settings.disableGameModifiers)
- bar->setBackgroundColor(getThemeColor(Theme::STATUSBAR_ON));
+ bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_ON));
else
- bar->setBackgroundColor(getThemeColor(Theme::STATUSBAR_OFF));
+ bar->setBackgroundColor(getThemeColor(ThemeColorId::STATUSBAR_OFF));
}
void StatusWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 6c48127c5..11d150f30 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -174,15 +174,15 @@ void TradeWindow::setMoney(const int amount)
else
{
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::WARNING)), getThemeColor(
- static_cast<int>(Theme::WARNING_OUTLINE)));
+ static_cast<int>(ThemeColorId::WARNING)), getThemeColor(
+ static_cast<int>(ThemeColorId::WARNING_OUTLINE)));
}
}
else
{
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::LABEL)), getThemeColor(
- static_cast<int>(Theme::LABEL_OUTLINE)));
+ static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
+ static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
mGotMaxMoney = amount;
}
@@ -278,8 +278,8 @@ void TradeWindow::reset()
mMoneyField->setEnabled(true);
mMoneyField->setText("");
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::LABEL)), getThemeColor(
- static_cast<int>(Theme::LABEL_OUTLINE)));
+ static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
+ static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
mAddButton->setEnabled(true);
mMoneyChangeButton->setEnabled(true);
mGotMoney = 0;
@@ -449,8 +449,8 @@ void TradeWindow::clear()
mGotMoney = 0;
mGotMaxMoney = 0;
mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(Theme::LABEL)), getThemeColor(
- static_cast<int>(Theme::LABEL_OUTLINE)));
+ static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
+ static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
}
void TradeWindow::addAutoItem(const std::string &nick, Item* const item,