aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me
diff options
context:
space:
mode:
authormsg-programs <msgdoesstuff@gmail.com>2023-05-21 20:59:44 +0200
committermsg-programs <msgdoesstuff@gmail.com>2023-05-21 20:59:44 +0200
commit6be72d37c9da40c5361699084808b52c32c29278 (patch)
tree80571865e18921f13d36b63b39d6e27fce9403fe /src/main/java/me
parent1b0053152f33164cc7e8572b87f6cf4755a75353 (diff)
downloadSkyblocker-6be72d37c9da40c5361699084808b52c32c29278.tar.gz
Skyblocker-6be72d37c9da40c5361699084808b52c32c29278.tar.bz2
Skyblocker-6be72d37c9da40c5361699084808b52c32c29278.zip
Fix colored part of ProgressComponent being transparent
Diffstat (limited to 'src/main/java/me')
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java
index f6618a98..6aaf9f67 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java
@@ -28,7 +28,7 @@ public class ProgressComponent extends Component {
this.ico = (ico == null) ? Ico.BARRIER : ico;
this.desc = d;
this.bar = b;
- this.color = color;
+ this.color = 0xff000000 | color;
this.pcnt = pcnt;
if (d == null || b == null) {
@@ -59,8 +59,9 @@ public class ProgressComponent extends Component {
int barX = x + ICO_DIM + PAD_L;
int barY = y + txtRend.fontHeight + PAD_S;
- DrawableHelper.fill(ms, barX, barY, barX + this.barW, barY + BAR_HEIGHT, COL_BG_BAR);
- DrawableHelper.fill(ms, barX, barY, barX + ((int) (this.barW * (this.pcnt / 100f))), barY + BAR_HEIGHT,
+ int endOffsX = ((int) (this.barW * (this.pcnt / 100f)));
+ DrawableHelper.fill(ms, barX + endOffsX, barY, barX + this.barW, barY + BAR_HEIGHT, COL_BG_BAR);
+ DrawableHelper.fill(ms, barX, barY, barX + endOffsX, barY + BAR_HEIGHT,
this.color);
txtRend.drawWithShadow(ms, bar, barX + 3, barY + 2, 0xffffffff);
}