summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/ministatuswindow.cpp29
-rw-r--r--src/gui/windows/ministatuswindow.h1
-rw-r--r--src/gui/windows/statuswindow.cpp13
-rw-r--r--src/gui/windows/updaterwindow.cpp2
5 files changed, 31 insertions, 18 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index b477e2b5a..3f447e443 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -118,7 +118,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
mInvCloseButton(nullptr),
mWeightBar(nullptr),
mSlotsBar(new ProgressBar(this, 0.0F, 100, 0, Theme::PROG_INVY_SLOTS,
- "slotsprogressbar.xml")),
+ "slotsprogressbar.xml", "slotsprogressbar_fill.xml")),
mFilter(nullptr),
mSortModel(new SortListModelInv),
mSortDropDown(new DropDown(this, mSortModel, false, false, this, "sort")),
@@ -227,7 +227,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
// TRANSLATORS: inventory button
mEquipmentButton = new Button(this, _("Equipment"), "equipment", this);
mWeightBar = new ProgressBar(this, 0.0F, 100, 0, Theme::PROG_WEIGHT,
- "weightprogressbar.xml");
+ "weightprogressbar.xml", "weightprogressbar_fill.xml");
mWeightBar->setColor(Theme::getThemeColor(Theme::WEIGHT_BAR),
Theme::getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index cd3f3701d..4559c1af4 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -63,7 +63,8 @@ MiniStatusWindow::MiniStatusWindow() :
mMaxX(0),
// TRANSLATORS: status bar name
mHpBar(createBar(0, 100, 0, Theme::HP_BAR, Theme::PROG_HP,
- "hpprogressbar.xml", "hp bar", _("health bar"))),
+ "hpprogressbar.xml", "hpprogressbar_fill.xml",
+ "hp bar", _("health bar"))),
mMpBar(Net::getGameHandler()->canUseMagicBar()
? createBar(0, 100, 0, Net::getPlayerHandler()->canUseMagic()
? Theme::MP_BAR : Theme::NO_MP_BAR,
@@ -71,30 +72,38 @@ MiniStatusWindow::MiniStatusWindow() :
? Theme::PROG_MP : Theme::PROG_NO_MP,
Net::getPlayerHandler()->canUseMagic()
? "mpprogressbar.xml" : "nompprogressbar.xml",
+ Net::getPlayerHandler()->canUseMagic()
+ ? "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,
+ "xpprogressbar.xml", "xpprogressbar_fill.xml",
// TRANSLATORS: status bar name
- "xpprogressbar.xml", "xp bar", _("experience bar"))),
+ "xp bar", _("experience bar"))),
mJobBar(nullptr),
mWeightBar(createBar(0, 140, 0, Theme::WEIGHT_BAR, Theme::PROG_WEIGHT,
+ "weightprogressbar.xml", "weightprogressbar_fill.xml",
// TRANSLATORS: status bar name
- "weightprogressbar.xml", "weight bar", _("weight bar"))),
+ "weight bar", _("weight bar"))),
mInvSlotsBar(createBar(0, 45, 0,
Theme::SLOTS_BAR, Theme::PROG_INVY_SLOTS,
- "slotsprogressbar.xml", "inventory slots bar",
+ "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,
+ "moneyprogressbar.xml", "moneyprogressbar_fill.xml",
// TRANSLATORS: status bar name
- "moneyprogressbar.xml", "money bar", _("money bar"))),
+ "money bar", _("money bar"))),
mArrowsBar(createBar(0, 50, 0, Theme::ARROWS_BAR, Theme::PROG_ARROWS,
+ "arrowsprogressbar.xml", "arrowsprogressbar_fill.xml",
// TRANSLATORS: status bar name
- "arrowsprogressbar.xml", "arrows bar", _("arrows bar"))),
+ "arrows bar", _("arrows bar"))),
mStatusBar(createBar(100, (config.getIntValue("fontSize") > 16
? 250 : 165), 0, Theme::STATUS_BAR, Theme::PROG_STATUS,
+ "statusprogressbar.xml", "statusprogressbar_fill.xml",
// TRANSLATORS: status bar name
- "statusprogressbar.xml", "status bar", _("status bar"))),
+ "status bar", _("status bar"))),
mTextPopup(new TextPopup),
mStatusPopup(new StatusPopup)
{
@@ -117,7 +126,8 @@ MiniStatusWindow::MiniStatusWindow() :
{
mJobBar = createBar(0, 100, 0, Theme::JOB_BAR, Theme::PROG_JOB,
// TRANSLATORS: status bar name
- "jobprogressbar.xml", "job bar", _("job bar"));
+ "jobprogressbar.xml", "jobprogressbar_fill.xml",
+ "job bar", _("job bar"));
StatusWindow::updateJobBar(mJobBar);
}
@@ -164,12 +174,13 @@ ProgressBar *MiniStatusWindow::createBar(const float progress,
const int textColor,
const int backColor,
const std::string &restrict skin,
+ const std::string &restrict skinFill,
const std::string &restrict name,
const std::string &restrict
description)
{
ProgressBar *const bar = new ProgressBar(this,
- progress, width, height, backColor, skin);
+ progress, width, height, backColor, skin, skinFill);
bar->setActionEventId(name);
bar->setId(description);
bar->setColor(Theme::getThemeColor(textColor),
diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h
index e2bae8a49..e73913683 100644
--- a/src/gui/windows/ministatuswindow.h
+++ b/src/gui/windows/ministatuswindow.h
@@ -100,6 +100,7 @@ class MiniStatusWindow final : public Popup,
const int width, const int height,
const int textColor, const int backColor,
const std::string &restrict skin,
+ const std::string &restrict skinFill,
const std::string &restrict name,
const std::string &restrict description)
A_WARN_UNUSED;
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 1f0fb4d91..2fb2e48e4 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -191,16 +191,16 @@ StatusWindow::StatusWindow() :
max = 1;
mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
- PlayerInfo::HP)) / static_cast<float>(max), 80, 0,
- Theme::PROG_HP, "hpprogressbar.xml");
+ PlayerInfo::HP)) / static_cast<float>(max), 80, 0, Theme::PROG_HP,
+ "hpprogressbar.xml", "hpprogressbar_fill.xml");
mHpBar->setColor(Theme::getThemeColor(Theme::HP_BAR),
Theme::getThemeColor(Theme::HP_BAR_OUTLINE));
max = PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED);
mXpBar = new ProgressBar(this, max ?
static_cast<float>(PlayerInfo::getAttribute(PlayerInfo::EXP))
- / static_cast<float>(max) : static_cast<float>(0),
- 80, 0, Theme::PROG_EXP, "xpprogressbar.xml");
+ / static_cast<float>(max) : static_cast<float>(0), 80, 0,
+ Theme::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml");
mXpBar->setColor(Theme::getThemeColor(Theme::XP_BAR),
Theme::getThemeColor(Theme::XP_BAR_OUTLINE));
@@ -218,7 +218,8 @@ StatusWindow::StatusWindow() :
PlayerInfo::getAttribute(PlayerInfo::MAX_MP))
/ static_cast<float>(max) : static_cast<float>(0),
80, 0, useMagic ? Theme::PROG_MP : Theme::PROG_NO_MP,
- useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml");
+ useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml",
+ useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
{
mMpBar->setColor(Theme::getThemeColor(Theme::MP_BAR),
@@ -258,7 +259,7 @@ StatusWindow::StatusWindow() :
// TRANSLATORS: status window label
mJobLabel = new Label(this, _("Job:"));
mJobBar = new ProgressBar(this, 0.0F, 80, 0, Theme::PROG_JOB,
- "jobprogressbar.xml");
+ "jobprogressbar.xml", "jobprogressbar_fill.xml");
mJobBar->setColor(Theme::getThemeColor(Theme::JOB_BAR),
Theme::getThemeColor(Theme::JOB_BAR_OUTLINE));
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index e219ab0b7..d33d58374 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -180,7 +180,7 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
// TRANSLATORS: updater window button
mPlayButton(new Button(this, _("Play"), "play", this)),
mProgressBar(new ProgressBar(this, 0.0, 310, 0, Theme::PROG_UPDATE,
- "updateprogressbar.xml")),
+ "updateprogressbar.xml", "updateprogressbar_fill.xml")),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
mScrollArea(new ScrollArea(mBrowserBox, true, "update_background.xml")),