diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-22 15:23:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-22 15:23:28 +0300 |
commit | d7131239c18eafecef2e8b8fa6898ba9962ff0e8 (patch) | |
tree | f54629cc0e2616281957e24e18f27f9d33ceaa4b /src/gui/windows/statuswindow.cpp | |
parent | 0dd6ab2bfdee4527ca0960b4e7a64e257bb93fa3 (diff) | |
download | manaverse-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.tar.gz manaverse-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.tar.bz2 manaverse-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.tar.xz manaverse-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.zip |
allow use different theme file for different progress bars.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 2cf1e9168..1f0fb4d91 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -191,15 +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); + PlayerInfo::HP)) / static_cast<float>(max), 80, 0, + Theme::PROG_HP, "hpprogressbar.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); + / static_cast<float>(max) : static_cast<float>(0), + 80, 0, Theme::PROG_EXP, "xpprogressbar.xml"); mXpBar->setColor(Theme::getThemeColor(Theme::XP_BAR), Theme::getThemeColor(Theme::XP_BAR_OUTLINE)); @@ -216,7 +217,8 @@ StatusWindow::StatusWindow() : mMpBar = new ProgressBar(this, max ? static_cast<float>( PlayerInfo::getAttribute(PlayerInfo::MAX_MP)) / static_cast<float>(max) : static_cast<float>(0), - 80, 0, useMagic ? Theme::PROG_MP : Theme::PROG_NO_MP); + 80, 0, useMagic ? Theme::PROG_MP : Theme::PROG_NO_MP, + useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml"); if (useMagic) { mMpBar->setColor(Theme::getThemeColor(Theme::MP_BAR), @@ -255,7 +257,8 @@ StatusWindow::StatusWindow() : mJobLvlLabel = new Label(this, strprintf(_("Job: %d"), 0)); // TRANSLATORS: status window label mJobLabel = new Label(this, _("Job:")); - mJobBar = new ProgressBar(this, 0.0F, 80, 0, Theme::PROG_JOB); + mJobBar = new ProgressBar(this, 0.0F, 80, 0, Theme::PROG_JOB, + "jobprogressbar.xml"); mJobBar->setColor(Theme::getThemeColor(Theme::JOB_BAR), Theme::getThemeColor(Theme::JOB_BAR_OUTLINE)); |