Hide auto retaliate from combat options (#7713)

Closes #7686
This commit is contained in:
Matthew Abel
2019-02-11 04:14:23 -05:00
committed by Tomas Slusny
parent d4808625af
commit 3a5ac9f725
4 changed files with 16 additions and 1 deletions

View File

@@ -513,6 +513,7 @@ public class WidgetID
static final int SPELL_BOX = 25;
static final int SPELL_ICON = 27;
static final int SPELL_TEXT = 28;
static final int AUTO_RETALIATE = 29;
}
static class VolcanicMine

View File

@@ -305,6 +305,7 @@ public enum WidgetInfo
COMBAT_SPELL_BOX(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_BOX),
COMBAT_SPELL_ICON(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_ICON),
COMBAT_SPELL_TEXT(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_TEXT),
COMBAT_AUTO_RETALIATE(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.AUTO_RETALIATE),
DIALOG_OPTION(WidgetID.DIALOG_OPTION_GROUP_ID, 0),

View File

@@ -97,11 +97,22 @@ public interface AttackStylesConfig extends Config
return false;
}
@ConfigItem(
keyName = "hideAutoRetaliate",
name = "Hide auto retaliate",
description = "Hide auto retaliate from the combat options tab",
position = 7
)
default boolean hideAutoRetaliate()
{
return false;
}
@ConfigItem(
keyName = "removeWarnedStyles",
name = "Remove warned styles",
description = "Remove warned styles from the combat options tab",
position = 7
position = 8
)
default boolean removeWarnedStyles()
{

View File

@@ -126,6 +126,7 @@ public class AttackStylesPlugin extends Plugin
overlayManager.remove(overlay);
hideWarnedStyles(false);
processWidgets();
hideWidget(client.getWidget(WidgetInfo.COMBAT_AUTO_RETALIATE), false);
}
public AttackStyle getAttackStyle()
@@ -174,6 +175,7 @@ public class AttackStylesPlugin extends Plugin
hideWidget(client.getWidget(widgetKey), widgetsToHide.get(equippedWeaponType, widgetKey));
}
}
hideWidget(client.getWidget(WidgetInfo.COMBAT_AUTO_RETALIATE), config.hideAutoRetaliate());
}
@Subscribe