diff options
author | ewew ukek <ewewukek@gmail.com> | 2024-04-05 00:07:00 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-04-05 00:07:00 +0000 |
commit | 6e9ca1f29fdcc3ebc80b8e5b70ca42f1e77050a9 (patch) | |
tree | f99f6ad9772efae7acda99bdfcab11df307386d4 /src | |
parent | 269c4a66ae940dee51ebf6625e9756f4de86f967 (diff) | |
download | plus-6e9ca1f29fdcc3ebc80b8e5b70ca42f1e77050a9.tar.gz plus-6e9ca1f29fdcc3ebc80b8e5b70ca42f1e77050a9.tar.bz2 plus-6e9ca1f29fdcc3ebc80b8e5b70ca42f1e77050a9.tar.xz plus-6e9ca1f29fdcc3ebc80b8e5b70ca42f1e77050a9.zip |
Rename hp bar color identifiers for clarity
Continuation of https://git.themanaworld.org/mana/plus/-/merge_requests/68#note_12819
I've renamed `*_HP2` to `*_HP_BG` and updated their descriptions. I didn't touch configuration keys intentionally.
"Renamed *_HP -> *_HP_FG. Also decided to keep descriptions as is or else they become unreadable."
See merge request mana/plus!71
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 20 | ||||
-rw-r--r-- | src/enums/gui/usercolorid.h | 20 | ||||
-rw-r--r-- | src/gui/userpalette.cpp | 33 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.cpp | 20 |
4 files changed, 47 insertions, 46 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 1aef0abea..ed124b472 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -4003,8 +4003,8 @@ void Being::drawPlayerSpriteAt(Graphics *restrict const graphics, PlayerInfo::getAttribute(Attributes::PLAYER_MAX_HP), PlayerInfo::getAttribute(Attributes::PLAYER_HP), 0, - UserColorId::PLAYER_HP, - UserColorId::PLAYER_HP2, + UserColorId::PLAYER_HP_FG, + UserColorId::PLAYER_HP_BG, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, @@ -4079,8 +4079,8 @@ void Being::drawMonsterSpriteAt(Graphics *restrict const graphics, maxHP, mHP, mDamageTaken, - UserColorId::MONSTER_HP, - UserColorId::MONSTER_HP2, + UserColorId::MONSTER_HP_FG, + UserColorId::MONSTER_HP_BG, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, @@ -4133,8 +4133,8 @@ void Being::drawHomunculusSpriteAt(Graphics *restrict const graphics, maxHP, PlayerInfo::getStatBase(Attributes::HOMUN_HP), mDamageTaken, - UserColorId::HOMUN_HP, - UserColorId::HOMUN_HP2, + UserColorId::HOMUN_HP_FG, + UserColorId::HOMUN_HP_BG, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, @@ -4188,8 +4188,8 @@ void Being::drawMercenarySpriteAt(Graphics *restrict const graphics, maxHP, PlayerInfo::getStatBase(Attributes::MERC_HP), mDamageTaken, - UserColorId::MERC_HP, - UserColorId::MERC_HP2, + UserColorId::MERC_HP_FG, + UserColorId::MERC_HP_BG, x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(), y + mapTileSize - 6 + mInfo->getHpBarOffsetY(), 2 * 50, @@ -4241,8 +4241,8 @@ void Being::drawElementalSpriteAt(Graphics *restrict const graphics, maxHP, PlayerInfo::getStatBase(Attributes::ELEMENTAL_HP), mDamageTaken, - UserColorId::ELEMENTAL_HP, - UserColorId::ELEMENTAL_HP2, + UserColorId::ELEMENTAL_HP_FG, + UserColorId::ELEMENTAL_HP_BG, 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 541060899..3a5e91203 100644 --- a/src/enums/gui/usercolorid.h +++ b/src/enums/gui/usercolorid.h @@ -56,16 +56,16 @@ enumStart(UserColorId) PICKUP_INFO, EXP_INFO, LABEL_HP, - PLAYER_HP, - PLAYER_HP2, - MONSTER_HP, - MONSTER_HP2, - HOMUN_HP, - HOMUN_HP2, - MERC_HP, - MERC_HP2, - ELEMENTAL_HP, - ELEMENTAL_HP2, + PLAYER_HP_FG, + PLAYER_HP_BG, + MONSTER_HP_FG, + MONSTER_HP_BG, + HOMUN_HP_FG, + HOMUN_HP_BG, + MERC_HP_FG, + MERC_HP_BG, + ELEMENTAL_HP_FG, + ELEMENTAL_HP_BG, LABEL_HITS, HIT_PLAYER_MONSTER, HIT_MONSTER_PLAYER, diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp index ca86fbb28..8ad436a60 100644 --- a/src/gui/userpalette.cpp +++ b/src/gui/userpalette.cpp @@ -284,65 +284,66 @@ UserPalette::UserPalette() : addLabel(UserColorId::LABEL_HP, // TRANSLATORS: palette label _("Hp bars")); - addColor(UserColorId::PLAYER_HP, + addColor(UserColorId::PLAYER_HP_FG, 0x00ff00, GradientType::STATIC, // TRANSLATORS: palette color - _("Player HP bar"), 50); - addColor(UserColorId::PLAYER_HP2, + _("Player HP bar"), + 50); + addColor(UserColorId::PLAYER_HP_BG, 0xff0000, GradientType::STATIC, // TRANSLATORS: palette color - _("Player HP bar (second color)"), + _("Player HP bar (background)"), 50); - addColor(UserColorId::MONSTER_HP, + addColor(UserColorId::MONSTER_HP_FG, 0x00ff00, GradientType::STATIC, // TRANSLATORS: palette color _("Monster HP bar"), 50); - addColor(UserColorId::MONSTER_HP2, + addColor(UserColorId::MONSTER_HP_BG, 0xff0000, GradientType::STATIC, // TRANSLATORS: palette color - _("Monster HP bar (second color)"), + _("Monster HP bar (background)"), 50); - addColor(UserColorId::HOMUN_HP, + addColor(UserColorId::HOMUN_HP_FG, 0x00ff00, GradientType::STATIC, // TRANSLATORS: palette color _("Homunculus HP bar"), 50); - addColor(UserColorId::HOMUN_HP2, + addColor(UserColorId::HOMUN_HP_BG, 0xff0000, GradientType::STATIC, // TRANSLATORS: palette color - _("Homunculus HP bar (second color)"), + _("Homunculus HP bar (background)"), 50); - addColor(UserColorId::MERC_HP, + addColor(UserColorId::MERC_HP_FG, 0x00ff00, GradientType::STATIC, // TRANSLATORS: palette color _("Mercenary HP bar"), 50); - addColor(UserColorId::MERC_HP2, + addColor(UserColorId::MERC_HP_BG, 0xff0000, GradientType::STATIC, // TRANSLATORS: palette color - _("Mercenary HP bar (second color)"), + _("Mercenary HP bar (background)"), 50); - addColor(UserColorId::ELEMENTAL_HP, + addColor(UserColorId::ELEMENTAL_HP_FG, 0x00ff00, GradientType::STATIC, // TRANSLATORS: palette color _("Elemental HP bar"), 50); - addColor(UserColorId::ELEMENTAL_HP2, + addColor(UserColorId::ELEMENTAL_HP_BG, 0xff0000, GradientType::STATIC, // TRANSLATORS: palette color - _("Elemental HP bar (second color)"), + _("Elemental HP bar (background)"), 50); addLabel(UserColorId::LABEL_HITS, // TRANSLATORS: palette label diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index 8c8e29467..0fde9b1f6 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -357,16 +357,16 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED) case UserColorId::COLLISION_HIGHLIGHT: case UserColorId::WALKABLE_HIGHLIGHT: 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::MONSTER_HP_FG: + case UserColorId::MONSTER_HP_BG: + case UserColorId::HOMUN_HP_FG: + case UserColorId::HOMUN_HP_BG: + case UserColorId::MERC_HP_FG: + case UserColorId::MERC_HP_BG: + case UserColorId::ELEMENTAL_HP_FG: + case UserColorId::ELEMENTAL_HP_BG: + case UserColorId::PLAYER_HP_FG: + case UserColorId::PLAYER_HP_BG: case UserColorId::FLOOR_ITEM_TEXT: case UserColorId::NET: // TRANSLATORS: colors tab. label. |