npc indicators: separate sw true tile and regular overlay
This commit is contained in:
@@ -45,6 +45,7 @@ public class HighlightedNpc
|
||||
boolean tile;
|
||||
boolean trueTile;
|
||||
boolean swTile;
|
||||
boolean swTrueTile;
|
||||
boolean outline;
|
||||
boolean name;
|
||||
boolean nameOnMinimap;
|
||||
|
||||
@@ -118,6 +118,18 @@ class NpcOverlay extends Overlay
|
||||
}
|
||||
|
||||
if (highlightedNpc.isSwTile())
|
||||
{
|
||||
int size = npcComposition.getSize();
|
||||
LocalPoint lp = actor.getLocalLocation();
|
||||
|
||||
int x = lp.getX() - ((size - 1) * Perspective.LOCAL_TILE_SIZE / 2);
|
||||
int y = lp.getY() - ((size - 1) * Perspective.LOCAL_TILE_SIZE / 2);
|
||||
|
||||
Polygon southWestTilePoly = Perspective.getCanvasTilePoly(client, new LocalPoint(x, y));
|
||||
renderPoly(graphics, borderColor, borderWidth, fillColor, southWestTilePoly);
|
||||
}
|
||||
|
||||
if (highlightedNpc.isSwTrueTile())
|
||||
{
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation());
|
||||
if (lp != null)
|
||||
|
||||
@@ -92,6 +92,18 @@ public interface NpcIndicatorsConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "highlightSouthWestTrueTile",
|
||||
name = "Highlight south west true tile",
|
||||
description = "Configures whether or not NPC should be highlighted by south western true tile",
|
||||
section = renderStyleSection
|
||||
)
|
||||
default boolean highlightSouthWestTrueTile()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 5,
|
||||
keyName = "highlightOutline",
|
||||
name = "Highlight outline",
|
||||
description = "Configures whether or not the model of the NPC should be highlighted by outline",
|
||||
|
||||
@@ -662,6 +662,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
.tile(config.highlightTile())
|
||||
.trueTile(config.highlightTrueTile())
|
||||
.swTile(config.highlightSouthWestTile())
|
||||
.swTrueTile(config.highlightSouthWestTrueTile())
|
||||
.outline(config.highlightOutline())
|
||||
.name(config.drawNames())
|
||||
.nameOnMinimap(config.drawMinimapNames())
|
||||
|
||||
Reference in New Issue
Block a user