progress bar: optimize bar drawing
It is not necessary to draw the full bar background since it is immediately drawn over by the foreground
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user