Merge pull request #536 from Abextm/logical-height
Fix overlays drawing too far above player's heads
This commit is contained in:
@@ -173,7 +173,7 @@ public class ImplingsOverlay extends Overlay
|
||||
graphics.drawOval(minimapLocation.getX(), minimapLocation.getY(), 5, 5);
|
||||
}
|
||||
|
||||
Point textLocation = actor.getCanvasTextLocation(graphics, text, actor.getModelHeight());
|
||||
Point textLocation = actor.getCanvasTextLocation(graphics, text, actor.getLogicalHeight());
|
||||
if (textLocation != null)
|
||||
{
|
||||
int x = textLocation.getX();
|
||||
|
||||
@@ -104,7 +104,7 @@ public class PlayerIndicatorsOverlay extends Overlay
|
||||
|
||||
final String name = actor.getName().replace('\u00A0', ' ');
|
||||
net.runelite.api.Point textLocation = actor
|
||||
.getCanvasTextLocation(graphics, name, actor.getModelHeight() + 40);
|
||||
.getCanvasTextLocation(graphics, name, actor.getLogicalHeight() + 40);
|
||||
|
||||
if (textLocation != null)
|
||||
{
|
||||
|
||||
@@ -250,7 +250,7 @@ public class OverlayUtil
|
||||
renderMinimapLocation(graphics, minimapLocation, color);
|
||||
}
|
||||
|
||||
Point textLocation = actor.getCanvasTextLocation(graphics, text, actor.getModelHeight() + 40);
|
||||
Point textLocation = actor.getCanvasTextLocation(graphics, text, actor.getLogicalHeight() + 40);
|
||||
if (textLocation != null)
|
||||
{
|
||||
renderTextLocation(graphics, textLocation, text, color);
|
||||
@@ -271,7 +271,7 @@ public class OverlayUtil
|
||||
renderMinimapLocation(graphics, minimapLocation, color);
|
||||
}
|
||||
|
||||
Point imageLocation = actor.getCanvasImageLocation(graphics, image, actor.getModelHeight());
|
||||
Point imageLocation = actor.getCanvasImageLocation(graphics, image, actor.getLogicalHeight());
|
||||
if (imageLocation != null)
|
||||
{
|
||||
renderImageLocation(graphics, imageLocation, image);
|
||||
@@ -292,7 +292,7 @@ public class OverlayUtil
|
||||
renderMinimapLocation(graphics, minimapLocation, color);
|
||||
}
|
||||
|
||||
Point imageLocation = actor.getCanvasSpriteLocation(graphics, sprite, actor.getModelHeight());
|
||||
Point imageLocation = actor.getCanvasSpriteLocation(graphics, sprite, actor.getLogicalHeight());
|
||||
if (imageLocation != null)
|
||||
{
|
||||
renderSpriteLocation(graphics, imageLocation, sprite);
|
||||
|
||||
Reference in New Issue
Block a user