Merge pull request #13712 from Bird-Hands/NPCIndicators

npc indicators: add outline width
This commit is contained in:
Jordan
2021-06-15 05:44:13 +00:00
committed by GitHub
2 changed files with 19 additions and 7 deletions

View File

@@ -109,6 +109,17 @@ public interface NpcIndicatorsConfig extends Config
@ConfigItem(
position = 5,
keyName = "borderWidth",
name = "Border Width",
description = "Width of the highlighted NPC border"
)
default double borderWidth()
{
return 2;
}
@ConfigItem(
position = 6,
keyName = "drawNames",
name = "Draw names above NPC",
description = "Configures whether or not NPC names should be drawn above the NPC"
@@ -119,7 +130,7 @@ public interface NpcIndicatorsConfig extends Config
}
@ConfigItem(
position = 6,
position = 7,
keyName = "drawMinimapNames",
name = "Draw names on minimap",
description = "Configures whether or not NPC names should be drawn on the minimap"
@@ -130,7 +141,7 @@ public interface NpcIndicatorsConfig extends Config
}
@ConfigItem(
position = 7,
position = 8,
keyName = "highlightMenuNames",
name = "Highlight menu names",
description = "Highlight NPC names in right click menu"
@@ -141,7 +152,7 @@ public interface NpcIndicatorsConfig extends Config
}
@ConfigItem(
position = 8,
position = 9,
keyName = "ignoreDeadNpcs",
name = "Ignore dead NPCs",
description = "Prevents highlighting NPCs after they are dead"
@@ -152,7 +163,7 @@ public interface NpcIndicatorsConfig extends Config
}
@ConfigItem(
position = 9,
position = 10,
keyName = "deadNpcMenuColor",
name = "Dead NPC menu color",
description = "Color of the NPC menus for dead NPCs"
@@ -160,7 +171,7 @@ public interface NpcIndicatorsConfig extends Config
Color deadNpcMenuColor();
@ConfigItem(
position = 10,
position = 11,
keyName = "showRespawnTimer",
name = "Show respawn timer",
description = "Show respawn timer of tagged NPCs")

View File

@@ -48,6 +48,7 @@ import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.OverlayUtil;
import net.runelite.client.util.ColorUtil;
import net.runelite.client.util.Text;
public class NpcSceneOverlay extends Overlay
@@ -197,9 +198,9 @@ public class NpcSceneOverlay extends Overlay
if (polygon != null)
{
graphics.setColor(color);
graphics.setStroke(new BasicStroke(2));
graphics.setStroke(new BasicStroke((float) config.borderWidth()));
graphics.draw(polygon);
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
graphics.setColor(ColorUtil.colorWithAlpha(color, 20));
graphics.fill(polygon);
}
}