summaryrefslogtreecommitdiff
path: root/src/gui/windows/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 15:18:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 15:18:19 +0300
commitaa86dbe6a7c966a4bfa7aa6c81218fe58f0bf92d (patch)
treed67adc2c432802949a4c43b6f1f476f878c8e6d4 /src/gui/windows/statuswindow.cpp
parent07121956f882dce22235868a25e0c2df96fb828a (diff)
downloadplus-aa86dbe6a7c966a4bfa7aa6c81218fe58f0bf92d.tar.gz
plus-aa86dbe6a7c966a4bfa7aa6c81218fe58f0bf92d.tar.bz2
plus-aa86dbe6a7c966a4bfa7aa6c81218fe58f0bf92d.tar.xz
plus-aa86dbe6a7c966a4bfa7aa6c81218fe58f0bf92d.zip
Move theme progress colors enum into separate file.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r--src/gui/windows/statuswindow.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 5e5dcff33..39dfaa7e2 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -28,12 +28,14 @@
#include "settings.h"
#include "units.h"
-#include "gui/windows/chatwindow.h"
+#include "enums/being/attributes.h"
+
+#include "enums/gui/progresscolorid.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
+#include "gui/windows/chatwindow.h"
#include "gui/windows/equipmentwindow.h"
#include "gui/windows/setupwindow.h"
@@ -111,7 +113,7 @@ StatusWindow::StatusWindow() :
max = 1;
mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
- Attributes::HP)) / static_cast<float>(max), 80, 0, Theme::PROG_HP,
+ Attributes::HP)) / static_cast<float>(max), 80, 0, ProgressColorId::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml");
mHpBar->setColor(getThemeColor(ThemeColorId::HP_BAR),
getThemeColor(ThemeColorId::HP_BAR_OUTLINE));
@@ -120,7 +122,7 @@ StatusWindow::StatusWindow() :
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");
+ ProgressColorId::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml");
mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR),
getThemeColor(ThemeColorId::XP_BAR_OUTLINE));
@@ -136,7 +138,7 @@ StatusWindow::StatusWindow() :
mMpBar = new ProgressBar(this, max ? static_cast<float>(
PlayerInfo::getAttribute(Attributes::MAX_MP))
/ static_cast<float>(max) : static_cast<float>(0),
- 80, 0, useMagic ? Theme::PROG_MP : Theme::PROG_NO_MP,
+ 80, 0, useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP,
useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml",
useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
@@ -177,7 +179,7 @@ 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, ProgressColorId::PROG_JOB,
"jobprogressbar.xml", "jobprogressbar_fill.xml");
mJobBar->setColor(getThemeColor(ThemeColorId::JOB_BAR),
getThemeColor(ThemeColorId::JOB_BAR_OUTLINE));
@@ -468,13 +470,13 @@ void StatusWindow::updateMPBar(ProgressBar *const bar,
{
bar->setColor(getThemeColor(ThemeColorId::MP_BAR),
getThemeColor(ThemeColorId::MP_BAR_OUTLINE));
- bar->setProgressPalette(Theme::PROG_MP);
+ bar->setProgressPalette(ProgressColorId::PROG_MP);
}
else
{
bar->setColor(getThemeColor(ThemeColorId::NO_MP_BAR),
getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE));
- bar->setProgressPalette(Theme::PROG_NO_MP);
+ bar->setProgressPalette(ProgressColorId::PROG_NO_MP);
}
bar->setProgress(prog);