From 6be72d37c9da40c5361699084808b52c32c29278 Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sun, 21 May 2023 20:59:44 +0200 Subject: Fix colored part of ProgressComponent being transparent --- .../skyblock/tabhud/widget/component/ProgressComponent.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main') 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); } -- cgit