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);
|
Color fillColor = new Color(0, 0, 0, 50);
|
||||||
boolean hull;
|
boolean hull;
|
||||||
boolean tile;
|
boolean tile;
|
||||||
|
boolean trueTile;
|
||||||
boolean swTile;
|
boolean swTile;
|
||||||
boolean outline;
|
boolean outline;
|
||||||
boolean name;
|
boolean name;
|
||||||
|
|||||||
@@ -103,6 +103,20 @@ class NpcOverlay extends Overlay
|
|||||||
renderPoly(graphics, borderColor, borderWidth, fillColor, tilePoly);
|
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())
|
if (highlightedNpc.isSwTile())
|
||||||
{
|
{
|
||||||
LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation());
|
LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation());
|
||||||
|
|||||||
@@ -68,6 +68,18 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 2,
|
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",
|
keyName = "highlightSouthWestTile",
|
||||||
name = "Highlight south west tile",
|
name = "Highlight south west tile",
|
||||||
description = "Configures whether or not NPC should be highlighted by south western tile",
|
description = "Configures whether or not NPC should be highlighted by south western tile",
|
||||||
@@ -79,7 +91,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 3,
|
position = 4,
|
||||||
keyName = "highlightOutline",
|
keyName = "highlightOutline",
|
||||||
name = "Highlight outline",
|
name = "Highlight outline",
|
||||||
description = "Configures whether or not the model of the NPC should be highlighted by 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
|
@Alpha
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 4,
|
position = 10,
|
||||||
keyName = "npcColor",
|
keyName = "npcColor",
|
||||||
name = "Highlight Color",
|
name = "Highlight Color",
|
||||||
description = "Color of the NPC highlight border, menu, and text",
|
description = "Color of the NPC highlight border, menu, and text",
|
||||||
@@ -105,7 +117,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
|
|
||||||
@Alpha
|
@Alpha
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 5,
|
position = 11,
|
||||||
keyName = "fillColor",
|
keyName = "fillColor",
|
||||||
name = "Fill Color",
|
name = "Fill Color",
|
||||||
description = "Color of the NPC highlight fill",
|
description = "Color of the NPC highlight fill",
|
||||||
@@ -117,7 +129,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 6,
|
position = 12,
|
||||||
keyName = "borderWidth",
|
keyName = "borderWidth",
|
||||||
name = "Border Width",
|
name = "Border Width",
|
||||||
description = "Width of the highlighted NPC border",
|
description = "Width of the highlighted NPC border",
|
||||||
@@ -129,7 +141,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 7,
|
position = 13,
|
||||||
keyName = "outlineFeather",
|
keyName = "outlineFeather",
|
||||||
name = "Outline feather",
|
name = "Outline feather",
|
||||||
description = "Specify between 0-4 how much of the model outline should be faded",
|
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())
|
.fillColor(config.fillColor())
|
||||||
.hull(config.highlightHull())
|
.hull(config.highlightHull())
|
||||||
.tile(config.highlightTile())
|
.tile(config.highlightTile())
|
||||||
|
.trueTile(config.highlightTrueTile())
|
||||||
.swTile(config.highlightSouthWestTile())
|
.swTile(config.highlightSouthWestTile())
|
||||||
.outline(config.highlightOutline())
|
.outline(config.highlightOutline())
|
||||||
.name(config.drawNames())
|
.name(config.drawNames())
|
||||||
|
|||||||
Reference in New Issue
Block a user