summaryrefslogtreecommitdiff
path: root/src/gui/windows/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-16 15:41:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-16 15:41:51 +0300
commit1b75e974088a94cd28d7a48729545904b2cd908b (patch)
treed771752fd0da4c58c8ff2d941c47274ead984e42 /src/gui/windows/statuswindow.cpp
parent46087564d4184b28740b0c45c1bac199ab1942ec (diff)
downloadplus-1b75e974088a94cd28d7a48729545904b2cd908b.tar.gz
plus-1b75e974088a94cd28d7a48729545904b2cd908b.tar.bz2
plus-1b75e974088a94cd28d7a48729545904b2cd908b.tar.xz
plus-1b75e974088a94cd28d7a48729545904b2cd908b.zip
Remove some useless static methods from theme.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r--src/gui/windows/statuswindow.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 05172c9b3..7fb4496cc 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -193,16 +193,16 @@ StatusWindow::StatusWindow() :
mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
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));
+ mHpBar->setColor(getThemeColor(Theme::HP_BAR),
+ 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", "xpprogressbar_fill.xml");
- mXpBar->setColor(Theme::getThemeColor(Theme::XP_BAR),
- Theme::getThemeColor(Theme::XP_BAR_OUTLINE));
+ mXpBar->setColor(getThemeColor(Theme::XP_BAR),
+ getThemeColor(Theme::XP_BAR_OUTLINE));
const bool magicBar = Net::getGameHandler()->canUseMagicBar();
const int job = Net::getPlayerHandler()->getJobLocation()
@@ -222,13 +222,13 @@ StatusWindow::StatusWindow() :
useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
{
- mMpBar->setColor(Theme::getThemeColor(Theme::MP_BAR),
- Theme::getThemeColor(Theme::MP_BAR_OUTLINE));
+ mMpBar->setColor(getThemeColor(Theme::MP_BAR),
+ getThemeColor(Theme::MP_BAR_OUTLINE));
}
else
{
- mMpBar->setColor(Theme::getThemeColor(Theme::NO_MP_BAR),
- Theme::getThemeColor(Theme::NO_MP_BAR_OUTLINE));
+ mMpBar->setColor(getThemeColor(Theme::NO_MP_BAR),
+ getThemeColor(Theme::NO_MP_BAR_OUTLINE));
}
}
else
@@ -260,8 +260,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(Theme::getThemeColor(Theme::JOB_BAR),
- Theme::getThemeColor(Theme::JOB_BAR_OUTLINE));
+ mJobBar->setColor(getThemeColor(Theme::JOB_BAR),
+ getThemeColor(Theme::JOB_BAR_OUTLINE));
place(3, 0, mJobLvlLabel, 3);
place(5, 2, mJobLabel).setPadding(3);
@@ -524,7 +524,8 @@ void StatusWindow::updateHPBar(ProgressBar *const bar, const bool showMax)
bar->setProgress(prog);
}
-void StatusWindow::updateMPBar(ProgressBar *const bar, const bool showMax)
+void StatusWindow::updateMPBar(ProgressBar *const bar,
+ const bool showMax) const
{
if (!bar)
return;
@@ -542,14 +543,14 @@ void StatusWindow::updateMPBar(ProgressBar *const bar, const bool showMax)
if (Net::getPlayerHandler()->canUseMagic())
{
- bar->setColor(Theme::getThemeColor(Theme::MP_BAR),
- Theme::getThemeColor(Theme::MP_BAR_OUTLINE));
+ bar->setColor(getThemeColor(Theme::MP_BAR),
+ getThemeColor(Theme::MP_BAR_OUTLINE));
bar->setProgressPalette(Theme::PROG_MP);
}
else
{
- bar->setColor(Theme::getThemeColor(Theme::NO_MP_BAR),
- Theme::getThemeColor(Theme::NO_MP_BAR_OUTLINE));
+ bar->setColor(getThemeColor(Theme::NO_MP_BAR),
+ getThemeColor(Theme::NO_MP_BAR_OUTLINE));
bar->setProgressPalette(Theme::PROG_NO_MP);
}
@@ -715,7 +716,7 @@ std::string StatusWindow::translateLetter2(std::string letters)
}
void StatusWindow::updateStatusBar(ProgressBar *const bar,
- const bool percent A_UNUSED)
+ const bool percent A_UNUSED) const
{
if (!player_node || !viewport)
return;
@@ -741,9 +742,9 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
bar->setProgress(50);
if (player_node->getDisableGameModifiers())
- bar->setBackgroundColor(Theme::getThemeColor(Theme::STATUSBAR_ON));
+ bar->setBackgroundColor(getThemeColor(Theme::STATUSBAR_ON));
else
- bar->setBackgroundColor(Theme::getThemeColor(Theme::STATUSBAR_OFF));
+ bar->setBackgroundColor(getThemeColor(Theme::STATUSBAR_OFF));
}
void StatusWindow::action(const ActionEvent &event)