npc indicators: separate sw true tile and regular overlay
This commit is contained in:
@@ -45,6 +45,7 @@ public class HighlightedNpc
|
|||||||
boolean tile;
|
boolean tile;
|
||||||
boolean trueTile;
|
boolean trueTile;
|
||||||
boolean swTile;
|
boolean swTile;
|
||||||
|
boolean swTrueTile;
|
||||||
boolean outline;
|
boolean outline;
|
||||||
boolean name;
|
boolean name;
|
||||||
boolean nameOnMinimap;
|
boolean nameOnMinimap;
|
||||||
|
|||||||
@@ -118,6 +118,18 @@ class NpcOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (highlightedNpc.isSwTile())
|
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());
|
LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation());
|
||||||
if (lp != null)
|
if (lp != null)
|
||||||
|
|||||||
@@ -92,6 +92,18 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 4,
|
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",
|
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",
|
||||||
|
|||||||
@@ -662,6 +662,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
|||||||
.tile(config.highlightTile())
|
.tile(config.highlightTile())
|
||||||
.trueTile(config.highlightTrueTile())
|
.trueTile(config.highlightTrueTile())
|
||||||
.swTile(config.highlightSouthWestTile())
|
.swTile(config.highlightSouthWestTile())
|
||||||
|
.swTrueTile(config.highlightSouthWestTrueTile())
|
||||||
.outline(config.highlightOutline())
|
.outline(config.highlightOutline())
|
||||||
.name(config.drawNames())
|
.name(config.drawNames())
|
||||||
.nameOnMinimap(config.drawMinimapNames())
|
.nameOnMinimap(config.drawMinimapNames())
|
||||||
|
|||||||
Reference in New Issue
Block a user