diff options
author | msg-programs <msgdoesstuff@gmail.com> | 2023-05-21 20:59:44 +0200 |
---|---|---|
committer | msg-programs <msgdoesstuff@gmail.com> | 2023-05-21 20:59:44 +0200 |
commit | 6be72d37c9da40c5361699084808b52c32c29278 (patch) | |
tree | 80571865e18921f13d36b63b39d6e27fce9403fe /src | |
parent | 1b0053152f33164cc7e8572b87f6cf4755a75353 (diff) | |
download | Skyblocker-6be72d37c9da40c5361699084808b52c32c29278.tar.gz Skyblocker-6be72d37c9da40c5361699084808b52c32c29278.tar.bz2 Skyblocker-6be72d37c9da40c5361699084808b52c32c29278.zip |
Fix colored part of ProgressComponent being transparent
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java | 7 |
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); } |