committed by
Tomas Slusny
parent
50518ebe72
commit
1242a508bc
@@ -92,4 +92,15 @@ public interface NpcAggroAreaConfig extends Config
|
||||
{
|
||||
return Color.YELLOW;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "npcUnaggroShowNotWorkingOverlay",
|
||||
name = "Hide overlay hint",
|
||||
description = "Hide overlay hint if plugin is enabled in unsupported area",
|
||||
position = 6
|
||||
)
|
||||
default boolean hideOverlayHint()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,12 +36,14 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
class NpcAggroAreaNotWorkingOverlay extends Overlay
|
||||
{
|
||||
private final NpcAggroAreaPlugin plugin;
|
||||
private final NpcAggroAreaConfig config;
|
||||
private final PanelComponent panelComponent;
|
||||
|
||||
@Inject
|
||||
private NpcAggroAreaNotWorkingOverlay(NpcAggroAreaPlugin plugin)
|
||||
private NpcAggroAreaNotWorkingOverlay(NpcAggroAreaPlugin plugin, NpcAggroAreaConfig config)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.config = config;
|
||||
|
||||
panelComponent = new PanelComponent();
|
||||
panelComponent.setPreferredSize(new Dimension(150, 0));
|
||||
@@ -56,7 +58,7 @@ class NpcAggroAreaNotWorkingOverlay extends Overlay
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
if (!plugin.isActive() || plugin.getSafeCenters()[1] != null)
|
||||
if (!plugin.isActive() || plugin.getSafeCenters()[1] != null || config.hideOverlayHint())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user