Less obnoxious whaleWaters overlay, adds a config option to display only a thin red border instead of the thick red border with large text.
This commit is contained in:
@@ -21,6 +21,17 @@ public interface WhaleWatchersConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 2,
|
position = 2,
|
||||||
|
keyName = "lessObnoxiousProtWarning",
|
||||||
|
name = "Less Obnoxious Protect Item Warning",
|
||||||
|
description = "Replaces the overlay with thick border and text with a less obtrusive overlay with a thin border and no text"
|
||||||
|
)
|
||||||
|
default boolean lessObnoxiousProtWarning()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 3,
|
||||||
keyName = "showDamageCounter",
|
keyName = "showDamageCounter",
|
||||||
name = "Damage Counter",
|
name = "Damage Counter",
|
||||||
description = "Shows damage you've done and damage your opponent has done to you while in a fight"
|
description = "Shows damage you've done and damage your opponent has done to you while in a fight"
|
||||||
@@ -31,7 +42,7 @@ public interface WhaleWatchersConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 3,
|
position = 4,
|
||||||
keyName = "smiteableWarning",
|
keyName = "smiteableWarning",
|
||||||
name = "Smite Warning",
|
name = "Smite Warning",
|
||||||
description = "Displays a warning overlay when your prayer is at a smiteable level"
|
description = "Displays a warning overlay when your prayer is at a smiteable level"
|
||||||
@@ -42,7 +53,7 @@ public interface WhaleWatchersConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 4,
|
position = 5,
|
||||||
keyName = "gloryWarning",
|
keyName = "gloryWarning",
|
||||||
name = "Glory Warning",
|
name = "Glory Warning",
|
||||||
description = "Displays a warning box while you are wearing an uncharged glory"
|
description = "Displays a warning box while you are wearing an uncharged glory"
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ public class WhaleWatchersPlugin extends Plugin
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean protectItemWarning;
|
private boolean protectItemWarning;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private boolean lessObnoxiousProtWarning;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showDamageCounter;
|
private boolean showDamageCounter;
|
||||||
private boolean smiteableWarning;
|
private boolean smiteableWarning;
|
||||||
private boolean gloryWarning;
|
private boolean gloryWarning;
|
||||||
@@ -303,6 +305,7 @@ public class WhaleWatchersPlugin extends Plugin
|
|||||||
private void updateConfig()
|
private void updateConfig()
|
||||||
{
|
{
|
||||||
this.protectItemWarning = config.protectItemWarning();
|
this.protectItemWarning = config.protectItemWarning();
|
||||||
|
this.lessObnoxiousProtWarning = config.lessObnoxiousProtWarning();
|
||||||
this.showDamageCounter = config.showDamageCounter();
|
this.showDamageCounter = config.showDamageCounter();
|
||||||
this.smiteableWarning = config.smiteableWarning();
|
this.smiteableWarning = config.smiteableWarning();
|
||||||
this.gloryWarning = config.gloryWarning();
|
this.gloryWarning = config.gloryWarning();
|
||||||
|
|||||||
@@ -56,12 +56,22 @@ public class WhaleWatchersProtOverlay extends Overlay
|
|||||||
rectangle.setBounds(client.getCanvas().getBounds());
|
rectangle.setBounds(client.getCanvas().getBounds());
|
||||||
rectangle.setLocation(client.getCanvas().getLocation());
|
rectangle.setLocation(client.getCanvas().getLocation());
|
||||||
Stroke oldStroke = graphics.getStroke();
|
Stroke oldStroke = graphics.getStroke();
|
||||||
graphics.setStroke(new BasicStroke(10));
|
if (plugin.isLessObnoxiousProtWarning())
|
||||||
|
{
|
||||||
|
graphics.setStroke(new BasicStroke(3));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
graphics.setStroke(new BasicStroke(10));
|
||||||
|
}
|
||||||
graphics.setColor(Color.RED);
|
graphics.setColor(Color.RED);
|
||||||
graphics.draw(rectangle);
|
graphics.draw(rectangle);
|
||||||
Font font = FontManager.getRunescapeBoldFont().deriveFont(Font.BOLD, 72);
|
if (!plugin.isLessObnoxiousProtWarning())
|
||||||
graphics.setFont(font);
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, new Point((int) rectangle.getCenterX() - 50, font.getSize()), "Protect item prayer disabled!!!", Color.red);
|
Font font = FontManager.getRunescapeBoldFont().deriveFont(Font.BOLD, 72);
|
||||||
|
graphics.setFont(font);
|
||||||
|
OverlayUtil.renderTextLocation(graphics, new Point((int) rectangle.getCenterX() - 50, font.getSize()), "Protect item prayer disabled!!!", Color.red);
|
||||||
|
}
|
||||||
graphics.setStroke(oldStroke);
|
graphics.setStroke(oldStroke);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user