prayer: fix HD prayer bar flick location
This commit is contained in:
@@ -109,10 +109,11 @@ class PrayerBarOverlay extends Overlay
|
||||
final double t = plugin.getTickProgress();
|
||||
final int halfBarWidth = (barWidth / 2) - HD_PRAYER_BAR_PADDING;
|
||||
|
||||
final int xOffset = (int) (-Math.cos(t) * halfBarWidth) + ((barWidth / 2) - halfBarWidth);
|
||||
final int xOffset = (int) (-Math.cos(t) * halfBarWidth) + halfBarWidth;
|
||||
|
||||
graphics.setColor(FLICK_HELP_COLOR);
|
||||
graphics.fillRect(barX + xOffset + HD_PRAYER_BAR_PADDING, barY + HD_PRAYER_BAR_PADDING, 1, barHeight - HD_PRAYER_BAR_PADDING * 2);
|
||||
// Padding is accounted for in the offset calculation
|
||||
graphics.fillRect(barX + xOffset, barY + HD_PRAYER_BAR_PADDING, 1, barHeight - HD_PRAYER_BAR_PADDING * 2);
|
||||
}
|
||||
|
||||
return new Dimension(barWidth, barHeight);
|
||||
|
||||
Reference in New Issue
Block a user