npc indicators: add true tile highlight
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user