WorldMapOverlay: Adjust tooltip text position to match vanilla tooltips (#12380)

This commit is contained in:
honeyhoney
2020-08-25 03:58:02 +01:00
committed by GitHub
parent 7efd8d18d1
commit 76d38333d2

View File

@@ -55,6 +55,7 @@ public class WorldMapOverlay extends Overlay
private static final int TOOLTIP_OFFSET_WIDTH = 5;
private static final int TOOLTIP_PADDING_HEIGHT = 1;
private static final int TOOLTIP_PADDING_WIDTH = 2;
private static final int TOOLTIP_TEXT_OFFSET_HEIGHT = -2;
private static final Splitter TOOLTIP_SPLITTER = Splitter.on("<br>").trimResults().omitEmptyStrings();
@@ -290,7 +291,7 @@ public class WorldMapOverlay extends Overlay
graphics.setColor(JagexColors.TOOLTIP_TEXT);
for (int i = 0; i < rows.size(); i++)
{
graphics.drawString(rows.get(i), drawPoint.getX(), drawPoint.getY() + (i + 1) * height);
graphics.drawString(rows.get(i), drawPoint.getX(), drawPoint.getY() + TOOLTIP_TEXT_OFFSET_HEIGHT + (i + 1) * height);
}
}