WorldMapOverlay: Adjust tooltip text position to match vanilla tooltips (#12380)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user