diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-05 21:49:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-06 12:12:22 +0300 |
commit | 2bd59adc7c456ce6f377feac8bc838e8011ebfc8 (patch) | |
tree | f2f25428e42e59b9a6d55d7c0be9a99c42e96e40 /src/gui/windows/statuswindow.cpp | |
parent | ac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff) | |
download | manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2 manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip |
Fix code style.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 39dfaa7e2..57f7d6f1e 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -28,10 +28,6 @@ #include "settings.h" #include "units.h" -#include "enums/being/attributes.h" - -#include "enums/gui/progresscolorid.h" - #include "being/localplayer.h" #include "being/playerinfo.h" @@ -112,17 +108,24 @@ StatusWindow::StatusWindow() : if (!max) max = 1; - mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute( - Attributes::HP)) / static_cast<float>(max), 80, 0, ProgressColorId::PROG_HP, + mHpBar = new ProgressBar(this, + static_cast<float>(PlayerInfo::getAttribute(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)); max = PlayerInfo::getAttribute(Attributes::EXP_NEEDED); - mXpBar = new ProgressBar(this, max ? - static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP)) - / static_cast<float>(max) : static_cast<float>(0), 80, 0, - ProgressColorId::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml"); + mXpBar = new ProgressBar(this, + max ? static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP)) + / static_cast<float>(max) : static_cast<float>(0), + 80, + 0, + ProgressColorId::PROG_EXP, + "xpprogressbar.xml", "xpprogressbar_fill.xml"); mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR), getThemeColor(ThemeColorId::XP_BAR_OUTLINE)); @@ -135,10 +138,13 @@ StatusWindow::StatusWindow() : // TRANSLATORS: status window label mMpLabel = new Label(this, _("MP:")); const bool useMagic = playerHandler->canUseMagic(); - mMpBar = new ProgressBar(this, max ? static_cast<float>( - PlayerInfo::getAttribute(Attributes::MAX_MP)) - / static_cast<float>(max) : static_cast<float>(0), - 80, 0, useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP, + mMpBar = new ProgressBar(this, + max ? static_cast<float>(PlayerInfo::getAttribute( + Attributes::MAX_MP)) / static_cast<float>(max) + : static_cast<float>(0), + 80, + 0, + useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP, useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml", useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml"); if (useMagic) |