diff --git a/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/HighlightedNpc.java b/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/HighlightedNpc.java index f0dc43184c..388da5be29 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/HighlightedNpc.java +++ b/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/HighlightedNpc.java @@ -43,6 +43,7 @@ public class HighlightedNpc Color fillColor = new Color(0, 0, 0, 50); boolean hull; boolean tile; + boolean trueTile; boolean swTile; boolean outline; boolean name; diff --git a/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/NpcOverlay.java b/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/NpcOverlay.java index 3ed64c499b..d0a8e4b3c4 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/NpcOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/game/npcoverlay/NpcOverlay.java @@ -103,6 +103,20 @@ class NpcOverlay extends Overlay renderPoly(graphics, borderColor, borderWidth, fillColor, tilePoly); } + if (highlightedNpc.isTrueTile()) + { + LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation()); // centered on sw tile + if (lp != null) + { + final int size = npcComposition.getSize(); + final LocalPoint centerLp = new LocalPoint( + lp.getX() + Perspective.LOCAL_TILE_SIZE * (size - 1) / 2, + lp.getY() + Perspective.LOCAL_TILE_SIZE * (size - 1) / 2); + Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, centerLp, size); + renderPoly(graphics, borderColor, borderWidth, fillColor, tilePoly); + } + } + if (highlightedNpc.isSwTile()) { LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java index 6c24e004fc..9a76bdf0f2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java @@ -68,6 +68,18 @@ public interface NpcIndicatorsConfig extends Config @ConfigItem( position = 2, + keyName = "highlightTrueTile", + name = "Highlight true tile", + description = "Configures whether or not NPC should be highlighted by true tile", + section = renderStyleSection + ) + default boolean highlightTrueTile() + { + return false; + } + + @ConfigItem( + position = 3, keyName = "highlightSouthWestTile", name = "Highlight south west tile", description = "Configures whether or not NPC should be highlighted by south western tile", @@ -79,7 +91,7 @@ public interface NpcIndicatorsConfig extends Config } @ConfigItem( - position = 3, + position = 4, keyName = "highlightOutline", name = "Highlight outline", description = "Configures whether or not the model of the NPC should be highlighted by outline", @@ -92,7 +104,7 @@ public interface NpcIndicatorsConfig extends Config @Alpha @ConfigItem( - position = 4, + position = 10, keyName = "npcColor", name = "Highlight Color", description = "Color of the NPC highlight border, menu, and text", @@ -105,7 +117,7 @@ public interface NpcIndicatorsConfig extends Config @Alpha @ConfigItem( - position = 5, + position = 11, keyName = "fillColor", name = "Fill Color", description = "Color of the NPC highlight fill", @@ -117,7 +129,7 @@ public interface NpcIndicatorsConfig extends Config } @ConfigItem( - position = 6, + position = 12, keyName = "borderWidth", name = "Border Width", description = "Width of the highlighted NPC border", @@ -129,7 +141,7 @@ public interface NpcIndicatorsConfig extends Config } @ConfigItem( - position = 7, + position = 13, keyName = "outlineFeather", name = "Outline feather", description = "Specify between 0-4 how much of the model outline should be faded", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java index 2fefccf511..96ee6e1383 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java @@ -660,6 +660,7 @@ public class NpcIndicatorsPlugin extends Plugin .fillColor(config.fillColor()) .hull(config.highlightHull()) .tile(config.highlightTile()) + .trueTile(config.highlightTrueTile()) .swTile(config.highlightSouthWestTile()) .outline(config.highlightOutline()) .name(config.drawNames())