From 6457681c5577fb3c51a149833d66edf12a57487e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 17 Oct 2020 19:36:36 -0400 Subject: [PATCH] progress bar: optimize bar drawing It is not necessary to draw the full bar background since it is immediately drawn over by the foreground --- .../client/ui/overlay/components/ProgressBarComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java index 01f52d6ad0..8ad38171ae 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java @@ -114,7 +114,7 @@ public class ProgressBarComponent implements LayoutableRenderableEntity // Draw bar graphics.setColor(backgroundColor); - graphics.fillRect(barX, barY, width, height); + graphics.fillRect(barX + progressFill, barY, width - progressFill, height); graphics.setColor(foregroundColor); graphics.fillRect(barX, barY, progressFill, height);