summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-04-24 00:06:56 +0200
committerFedja Beader <fedja@protonmail.ch>2024-04-24 11:53:42 +0000
commit0943a7ae0d62b032c65cc462e3b542b6435a259e (patch)
treede14e33638ee958335835b941933844ae8d24997
parentebbd31598cd8875a1d04fe8357bdb7e8f678236a (diff)
downloadManaVerse-mp_bar.tar.gz
ManaVerse-mp_bar.tar.bz2
ManaVerse-mp_bar.tar.xz
ManaVerse-mp_bar.zip
Rename color identifiers for claritymp_bar
-rw-r--r--src/being/being.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index e918877a1..6dd797eac 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -4309,8 +4309,8 @@ void Being::drawHpBar(Graphics *restrict const graphics,
const int maxHP,
const int hp,
const int damage,
- const UserColorIdT color1,
- const UserColorIdT color2,
+ const UserColorIdT colorFG,
+ const UserColorIdT colorBG,
const int x,
const int y,
const int width,
@@ -4346,13 +4346,13 @@ void Being::drawHpBar(Graphics *restrict const graphics,
if ((damage == 0 && (this != localPlayer || hp == maxHP))
|| (hp == 0 && maxHP == damage))
{
- graphics->setColor(userPalette->getColorWithAlpha(color1));
+ graphics->setColor(userPalette->getColorWithAlpha(colorFG));
graphics->fillRectangle(Rect(x, y, dx, height));
return;
}
else if (width - dx <= 0)
{
- graphics->setColor(userPalette->getColorWithAlpha(color2));
+ graphics->setColor(userPalette->getColorWithAlpha(colorBG));
graphics->fillRectangle(Rect(x, y, width, height));
return;
}
@@ -4362,22 +4362,23 @@ void Being::drawHpBar(Graphics *restrict const graphics,
{
if (hp == maxHP)
{
- graphics->setColor(userPalette->getColorWithAlpha(color1));
+ graphics->setColor(userPalette->getColorWithAlpha(colorFG));
graphics->fillRectangle(Rect(x, y, dx, height));
return;
}
else if (width - dx <= 0)
{
- graphics->setColor(userPalette->getColorWithAlpha(color2));
+ graphics->setColor(userPalette->getColorWithAlpha(colorBG));
graphics->fillRectangle(Rect(x, y, width, height));
return;
}
}
- graphics->setColor(userPalette->getColorWithAlpha(color1));
+ // foreground
+ graphics->setColor(userPalette->getColorWithAlpha(colorFG));
graphics->fillRectangle(Rect(x, y, dx, height));
-
- graphics->setColor(userPalette->getColorWithAlpha(color2));
+ // background
+ graphics->setColor(userPalette->getColorWithAlpha(colorBG));
graphics->fillRectangle(Rect(x + dx, y, width - dx, height));
}