Merge pull request #13712 from Bird-Hands/NPCIndicators
npc indicators: add outline width
This commit is contained in:
@@ -109,6 +109,17 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 5,
|
position = 5,
|
||||||
|
keyName = "borderWidth",
|
||||||
|
name = "Border Width",
|
||||||
|
description = "Width of the highlighted NPC border"
|
||||||
|
)
|
||||||
|
default double borderWidth()
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 6,
|
||||||
keyName = "drawNames",
|
keyName = "drawNames",
|
||||||
name = "Draw names above NPC",
|
name = "Draw names above NPC",
|
||||||
description = "Configures whether or not NPC names should be drawn above the NPC"
|
description = "Configures whether or not NPC names should be drawn above the NPC"
|
||||||
@@ -119,7 +130,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 6,
|
position = 7,
|
||||||
keyName = "drawMinimapNames",
|
keyName = "drawMinimapNames",
|
||||||
name = "Draw names on minimap",
|
name = "Draw names on minimap",
|
||||||
description = "Configures whether or not NPC names should be drawn on the minimap"
|
description = "Configures whether or not NPC names should be drawn on the minimap"
|
||||||
@@ -130,7 +141,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 7,
|
position = 8,
|
||||||
keyName = "highlightMenuNames",
|
keyName = "highlightMenuNames",
|
||||||
name = "Highlight menu names",
|
name = "Highlight menu names",
|
||||||
description = "Highlight NPC names in right click menu"
|
description = "Highlight NPC names in right click menu"
|
||||||
@@ -141,7 +152,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 8,
|
position = 9,
|
||||||
keyName = "ignoreDeadNpcs",
|
keyName = "ignoreDeadNpcs",
|
||||||
name = "Ignore dead NPCs",
|
name = "Ignore dead NPCs",
|
||||||
description = "Prevents highlighting NPCs after they are dead"
|
description = "Prevents highlighting NPCs after they are dead"
|
||||||
@@ -152,7 +163,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 9,
|
position = 10,
|
||||||
keyName = "deadNpcMenuColor",
|
keyName = "deadNpcMenuColor",
|
||||||
name = "Dead NPC menu color",
|
name = "Dead NPC menu color",
|
||||||
description = "Color of the NPC menus for dead NPCs"
|
description = "Color of the NPC menus for dead NPCs"
|
||||||
@@ -160,7 +171,7 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
Color deadNpcMenuColor();
|
Color deadNpcMenuColor();
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 10,
|
position = 11,
|
||||||
keyName = "showRespawnTimer",
|
keyName = "showRespawnTimer",
|
||||||
name = "Show respawn timer",
|
name = "Show respawn timer",
|
||||||
description = "Show respawn timer of tagged NPCs")
|
description = "Show respawn timer of tagged NPCs")
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import net.runelite.client.ui.overlay.Overlay;
|
|||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
import net.runelite.client.util.ColorUtil;
|
||||||
import net.runelite.client.util.Text;
|
import net.runelite.client.util.Text;
|
||||||
|
|
||||||
public class NpcSceneOverlay extends Overlay
|
public class NpcSceneOverlay extends Overlay
|
||||||
@@ -197,9 +198,9 @@ public class NpcSceneOverlay extends Overlay
|
|||||||
if (polygon != null)
|
if (polygon != null)
|
||||||
{
|
{
|
||||||
graphics.setColor(color);
|
graphics.setColor(color);
|
||||||
graphics.setStroke(new BasicStroke(2));
|
graphics.setStroke(new BasicStroke((float) config.borderWidth()));
|
||||||
graphics.draw(polygon);
|
graphics.draw(polygon);
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
graphics.setColor(ColorUtil.colorWithAlpha(color, 20));
|
||||||
graphics.fill(polygon);
|
graphics.fill(polygon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user