client: readjust widget item overlay positions for modified widget item bounds
This commit is contained in:
@@ -58,7 +58,7 @@ public class InventoryTagsOverlay extends WidgetItemOverlay
|
|||||||
{
|
{
|
||||||
Rectangle bounds = itemWidget.getCanvasBounds();
|
Rectangle bounds = itemWidget.getCanvasBounds();
|
||||||
final BufferedImage outline = itemManager.getItemOutline(itemId, itemWidget.getQuantity(), color);
|
final BufferedImage outline = itemManager.getItemOutline(itemId, itemWidget.getQuantity(), color);
|
||||||
graphics.drawImage(outline, (int) bounds.getX() + 1, (int) bounds.getY() + 1, null);
|
graphics.drawImage(outline, (int) bounds.getX(), (int) bounds.getY(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class ItemChargeOverlay extends WidgetItemOverlay
|
|||||||
|
|
||||||
final Rectangle bounds = itemWidget.getCanvasBounds();
|
final Rectangle bounds = itemWidget.getCanvasBounds();
|
||||||
final TextComponent textComponent = new TextComponent();
|
final TextComponent textComponent = new TextComponent();
|
||||||
textComponent.setPosition(new Point(bounds.x, bounds.y + 16));
|
textComponent.setPosition(new Point(bounds.x - 1, bounds.y + 15));
|
||||||
textComponent.setText(charges < 0 ? "?" : String.valueOf(charges));
|
textComponent.setText(charges < 0 ? "?" : String.valueOf(charges));
|
||||||
textComponent.setColor(itemChargePlugin.getColor(charges));
|
textComponent.setColor(itemChargePlugin.getColor(charges));
|
||||||
textComponent.render(graphics);
|
textComponent.render(graphics);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class ItemIdentificationOverlay extends WidgetItemOverlay
|
|||||||
private void renderText(Graphics2D graphics, Rectangle bounds, ItemIdentification iden)
|
private void renderText(Graphics2D graphics, Rectangle bounds, ItemIdentification iden)
|
||||||
{
|
{
|
||||||
final TextComponent textComponent = new TextComponent();
|
final TextComponent textComponent = new TextComponent();
|
||||||
textComponent.setPosition(new Point(bounds.x, bounds.y + bounds.height));
|
textComponent.setPosition(new Point(bounds.x - 1, bounds.y + bounds.height - 1));
|
||||||
textComponent.setColor(config.textColor());
|
textComponent.setColor(config.textColor());
|
||||||
switch (config.identificationType())
|
switch (config.identificationType())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -118,13 +118,13 @@ public class RunepouchOverlay extends WidgetItemOverlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
graphics.setColor(Color.black);
|
graphics.setColor(Color.black);
|
||||||
graphics.drawString("" + formatNumber(amount), location.getX() + (config.showIcons() ? 13 : 6),
|
|
||||||
location.getY() + 14 + (graphics.getFontMetrics().getHeight() - 1) * i);
|
|
||||||
|
|
||||||
graphics.setColor(config.fontColor());
|
|
||||||
graphics.drawString("" + formatNumber(amount), location.getX() + (config.showIcons() ? 12 : 5),
|
graphics.drawString("" + formatNumber(amount), location.getX() + (config.showIcons() ? 12 : 5),
|
||||||
location.getY() + 13 + (graphics.getFontMetrics().getHeight() - 1) * i);
|
location.getY() + 13 + (graphics.getFontMetrics().getHeight() - 1) * i);
|
||||||
|
|
||||||
|
graphics.setColor(config.fontColor());
|
||||||
|
graphics.drawString("" + formatNumber(amount), location.getX() + (config.showIcons() ? 11 : 4),
|
||||||
|
location.getY() + 12 + (graphics.getFontMetrics().getHeight() - 1) * i);
|
||||||
|
|
||||||
if (!config.showIcons())
|
if (!config.showIcons())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@@ -134,7 +134,7 @@ public class RunepouchOverlay extends WidgetItemOverlay
|
|||||||
if (image != null)
|
if (image != null)
|
||||||
{
|
{
|
||||||
OverlayUtil.renderImageLocation(graphics,
|
OverlayUtil.renderImageLocation(graphics,
|
||||||
new Point(location.getX(), location.getY() + graphics.getFontMetrics().getHeight() * i),
|
new Point(location.getX() - 1, location.getY() + graphics.getFontMetrics().getHeight() * i - 1),
|
||||||
image);
|
image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class SlayerOverlay extends WidgetItemOverlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw the counter in the bottom left for equipment, and top left for jewelry
|
// Draw the counter in the bottom left for equipment, and top left for jewelry
|
||||||
textComponent.setPosition(new Point(bounds.x, bounds.y + (SLAYER_JEWELRY.contains(itemId)
|
textComponent.setPosition(new Point(bounds.x - 1, bounds.y - 1 + (SLAYER_JEWELRY.contains(itemId)
|
||||||
? bounds.height
|
? bounds.height
|
||||||
: graphics.getFontMetrics().getHeight())));
|
: graphics.getFontMetrics().getHeight())));
|
||||||
textComponent.render(graphics);
|
textComponent.render(graphics);
|
||||||
|
|||||||
Reference in New Issue
Block a user