From cabaf2d33cce91b246cb8f2f95639206167c77de Mon Sep 17 00:00:00 2001 From: JerwuQu Date: Sun, 22 Apr 2018 05:27:26 +0200 Subject: [PATCH] Allow customization of barrows brother location colors --- .../client/plugins/barrows/BarrowsConfig.java | 31 +++++++++++++++++-- .../plugins/barrows/BarrowsOverlay.java | 4 +-- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsConfig.java index f113dab035..86ee6079dd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsConfig.java @@ -24,6 +24,7 @@ */ package net.runelite.client.plugins.barrows; +import java.awt.Color; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; @@ -38,7 +39,8 @@ public interface BarrowsConfig extends Config @ConfigItem( keyName = "showMinimap", name = "Show Minimap in tunnels", - description = "Configures whether or not the minimap is displayed" + description = "Configures whether or not the minimap is displayed", + position = 0 ) default boolean showMinimap() { @@ -48,10 +50,33 @@ public interface BarrowsConfig extends Config @ConfigItem( keyName = "showBrotherLoc", name = "Show Brothers location", - description = "Configures whether or not the brothers location is displayed" + description = "Configures whether or not the brothers location is displayed", + position = 1 ) default boolean showBrotherLoc() { return true; } -} \ No newline at end of file + + @ConfigItem( + keyName = "brotherLocColor", + name = "Brother location color", + description = "Change the color of the name displayed on the minimap", + position = 2 + ) + default Color brotherLocColor() + { + return Color.CYAN; + } + + @ConfigItem( + keyName = "deadBrotherLocColor", + name = "Dead Brother loc. color", + description = "Change the color of the name displayed on the minimap for a dead brother", + position = 3 + ) + default Color deadBrotherLocColor() + { + return Color.RED; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsOverlay.java index 869afdca6f..c73003a1e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/barrows/BarrowsOverlay.java @@ -179,11 +179,11 @@ class BarrowsOverlay extends Overlay if (client.getSetting(brother.getKilledVarbit()) > 0) { - graphics.setColor(Color.red); + graphics.setColor(config.deadBrotherLocColor()); } else { - graphics.setColor(Color.cyan); + graphics.setColor(config.brotherLocColor()); } graphics.drawString(brother.getName(), minimapText.getX(), minimapText.getY());