diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-22 20:03:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-22 20:03:20 +0300 |
commit | 15309c3bb75a5d5d1b56171fe1bd91b96e1735b8 (patch) | |
tree | 456439afcc908a50360bb8968f143dab32a4251e /src/gui/windows/statuswindow.cpp | |
parent | 2425f9821deb57ceab2f6e6a5aa01a0784e07148 (diff) | |
download | mv-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.tar.gz mv-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.tar.bz2 mv-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.tar.xz mv-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.zip |
allow fill complete part of progress bar with images.
For this need add in progress bar theme file option fillImage and set it to 1.
Then add progress bar xml file for image with name: name_fill.xml.
Default is: progressbar_fill.xml
New theme option: fillImage
New theme file (default name): progressbar_fill.xml
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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)); |