diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-06 17:15:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-06 17:15:02 +0300 |
commit | 8b89f43575300bceaa7ce659117707f1cbc5eddd (patch) | |
tree | 79e933c0c059ed508b1cb9facc08abed2fd07461 | |
parent | 382f966805d025b81eb7004e0ed03bdaae8ae637 (diff) | |
download | ManaVerse-8b89f43575300bceaa7ce659117707f1cbc5eddd.tar.gz ManaVerse-8b89f43575300bceaa7ce659117707f1cbc5eddd.tar.bz2 ManaVerse-8b89f43575300bceaa7ce659117707f1cbc5eddd.tar.xz ManaVerse-8b89f43575300bceaa7ce659117707f1cbc5eddd.zip |
Add own colors for hp bars for homunculus, mercenary, elemental.
-rw-r--r-- | src/being/being.cpp | 12 | ||||
-rw-r--r-- | src/enums/gui/usercolorid.h | 6 | ||||
-rw-r--r-- | src/gui/userpalette.cpp | 43 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.cpp | 6 |
4 files changed, 61 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index b4fe2c883..14fddc6c0 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3888,8 +3888,8 @@ void Being::drawHomunculusSpriteAt(Graphics *restrict const graphics, maxHP, PlayerInfo::getStatBase(Attributes::HOMUN_HP), mDamageTaken, - UserColorId::MONSTER_HP, - UserColorId::MONSTER_HP2, + UserColorId::HOMUN_HP, + UserColorId::HOMUN_HP2, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, @@ -3943,8 +3943,8 @@ void Being::drawMercenarySpriteAt(Graphics *restrict const graphics, maxHP, PlayerInfo::getStatBase(Attributes::MERC_HP), mDamageTaken, - UserColorId::MONSTER_HP, - UserColorId::MONSTER_HP2, + UserColorId::MERC_HP, + UserColorId::MERC_HP2, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, @@ -3996,8 +3996,8 @@ void Being::drawElementalSpriteAt(Graphics *restrict const graphics, maxHP, PlayerInfo::getStatBase(Attributes::ELEMENTAL_HP), mDamageTaken, - UserColorId::MONSTER_HP, - UserColorId::MONSTER_HP2, + UserColorId::ELEMENTAL_HP, + UserColorId::ELEMENTAL_HP2, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, diff --git a/src/enums/gui/usercolorid.h b/src/enums/gui/usercolorid.h index 02a7a53ac..3da13ea42 100644 --- a/src/enums/gui/usercolorid.h +++ b/src/enums/gui/usercolorid.h @@ -59,6 +59,12 @@ enumStart(UserColorId) PLAYER_HP2, MONSTER_HP, MONSTER_HP2, + HOMUN_HP, + HOMUN_HP2, + MERC_HP, + MERC_HP2, + ELEMENTAL_HP, + ELEMENTAL_HP2, LABEL_HITS, HIT_PLAYER_MONSTER, HIT_MONSTER_PLAYER, diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp index d52463425..ac0049b87 100644 --- a/src/gui/userpalette.cpp +++ b/src/gui/userpalette.cpp @@ -64,6 +64,12 @@ const std::string ColorTypeNames[CAST_SIZE( "ColorPlayerHp2", "ColorMonsterHp", "ColorMonsterHp2", + "ColorHomunHp", + "ColorHomunHp2", + "ColorMercHp", + "ColorMercHp2", + "ColorElementalHp", + "ColorElementalHp2", "", "ColorHitPlayerMonster", "ColorHitMonsterPlayer", @@ -273,6 +279,43 @@ UserPalette::UserPalette() : // TRANSLATORS: palette color _("Monster HP bar (second color)"), 50); + addColor(UserColorId::HOMUN_HP, + 0x00ff00, + GradientType::STATIC, + // TRANSLATORS: palette color + _("Homunculus HP bar"), + 50); + addColor(UserColorId::HOMUN_HP2, + 0xff0000, + GradientType::STATIC, + // TRANSLATORS: palette color + _("Homunculus HP bar (second color)"), + 50); + addColor(UserColorId::MERC_HP, + 0x00ff00, + GradientType::STATIC, + // TRANSLATORS: palette color + _("Mercenary HP bar"), + 50); + addColor(UserColorId::MERC_HP2, + 0xff0000, + GradientType::STATIC, + // TRANSLATORS: palette color + _("Mercenary HP bar (second color)"), + 50); + + addColor(UserColorId::ELEMENTAL_HP, + 0x00ff00, + GradientType::STATIC, + // TRANSLATORS: palette color + _("Elemental HP bar"), + 50); + addColor(UserColorId::ELEMENTAL_HP2, + 0xff0000, + GradientType::STATIC, + // TRANSLATORS: palette color + _("Elemental HP bar (second color)"), + 50); addLabel(UserColorId::LABEL_HITS, // TRANSLATORS: palette label _("Hits")); diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index 12b3f0ba3..d2f38f745 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -350,6 +350,12 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED) case UserColorId::ROAD_POINT: case UserColorId::MONSTER_HP: case UserColorId::MONSTER_HP2: + case UserColorId::HOMUN_HP: + case UserColorId::HOMUN_HP2: + case UserColorId::MERC_HP: + case UserColorId::MERC_HP2: + case UserColorId::ELEMENTAL_HP: + case UserColorId::ELEMENTAL_HP2: case UserColorId::PLAYER_HP: case UserColorId::PLAYER_HP2: case UserColorId::FLOOR_ITEM_TEXT: |