@@ -37,7 +37,6 @@ public interface NpcAggroAreaConfig extends Config
|
|||||||
String CONFIG_CENTER2 = "center2";
|
String CONFIG_CENTER2 = "center2";
|
||||||
String CONFIG_LOCATION = "location";
|
String CONFIG_LOCATION = "location";
|
||||||
String CONFIG_DURATION = "duration";
|
String CONFIG_DURATION = "duration";
|
||||||
String CONFIG_NOT_WORKING_OVERLAY = "overlay";
|
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "npcUnaggroAlwaysActive",
|
keyName = "npcUnaggroAlwaysActive",
|
||||||
@@ -96,12 +95,12 @@ public interface NpcAggroAreaConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "npcUnaggroShowNotWorkingOverlay",
|
keyName = "npcUnaggroShowNotWorkingOverlay",
|
||||||
name = "Show not working hint",
|
name = "Hide overlay hint",
|
||||||
description = "Show hint if plugin is enabled in unsupported area",
|
description = "Hide overlay hint if plugin is enabled in unsupported area",
|
||||||
position = 6
|
position = 6
|
||||||
)
|
)
|
||||||
default boolean showNotWorkingOverlay()
|
default boolean hideOverlayHint()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,12 +36,14 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
|
|||||||
class NpcAggroAreaNotWorkingOverlay extends Overlay
|
class NpcAggroAreaNotWorkingOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final NpcAggroAreaPlugin plugin;
|
private final NpcAggroAreaPlugin plugin;
|
||||||
|
private final NpcAggroAreaConfig config;
|
||||||
private final PanelComponent panelComponent;
|
private final PanelComponent panelComponent;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private NpcAggroAreaNotWorkingOverlay(NpcAggroAreaPlugin plugin)
|
private NpcAggroAreaNotWorkingOverlay(NpcAggroAreaPlugin plugin, NpcAggroAreaConfig config)
|
||||||
{
|
{
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
this.config = config;
|
||||||
|
|
||||||
panelComponent = new PanelComponent();
|
panelComponent = new PanelComponent();
|
||||||
panelComponent.setPreferredSize(new Dimension(150, 0));
|
panelComponent.setPreferredSize(new Dimension(150, 0));
|
||||||
@@ -56,7 +58,7 @@ class NpcAggroAreaNotWorkingOverlay extends Overlay
|
|||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
if (!plugin.isActive() || plugin.getSafeCenters()[1] != null)
|
if (!plugin.isActive() || plugin.getSafeCenters()[1] != null || config.hideOverlayHint())
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user