PrayAgainstPlayer: Add config option for Highlight (#2100)

PrayAgainstPlayer: Add config option for Highlight
This commit is contained in:
Owain van Brakel
2019-12-06 00:18:17 +01:00
committed by GitHub
2 changed files with 33 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ package net.runelite.client.plugins.prayagainstplayer;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Range;
@ConfigGroup("prayagainstplayer")
public interface PrayAgainstPlayerConfig extends Config
@@ -63,4 +64,32 @@ public interface PrayAgainstPlayerConfig extends Config
{
return false;
}
@ConfigItem(
position = 4,
keyName = "highlightAttackers",
name = "Highlight Attackers",
description = "This will highlight attackers."
)
default boolean highlightAttackers()
{
return false;
}
@Range(
min = 1,
max = 10
)
@ConfigItem(
position = 5,
keyName = "highlightWidth",
name = "Highlight Width",
description = "This will set the highlight attackers outline width.",
hidden = true,
unhide = "highlightAttackers"
)
default int highlightWidth()
{
return 4;
}
}

View File

@@ -66,6 +66,8 @@ public class PrayAgainstPlayerPlugin extends Plugin
private boolean ignoreFriends;
private boolean ignoreClanMates;
private boolean drawTargetPrayAgainstPrayerTab;
private boolean highlightAttackers;
private int highlightWidth;
@Provides
PrayAgainstPlayerConfig provideConfig(ConfigManager configManager)
@@ -104,6 +106,8 @@ public class PrayAgainstPlayerPlugin extends Plugin
this.ignoreFriends = config.ignoreFriends();
this.ignoreClanMates = config.ignoreClanMates();
this.drawTargetPrayAgainstPrayerTab = config.drawTargetPrayAgainstPrayerTab();
this.highlightAttackers = config.highlightAttackers();
this.highlightWidth = config.highlightWidth();
if (this.drawTargetPrayAgainstPrayerTab)
{