From 05c4a5c1d5e1cc64672fead0c223f47cfcae1ff1 Mon Sep 17 00:00:00 2001 From: Snowflak3 Date: Mon, 20 Jul 2020 18:00:01 -0500 Subject: [PATCH] notifier: make flash color configurable Co-authored-by: Snowflak3 --- .../src/main/java/net/runelite/client/Notifier.java | 3 +-- .../net/runelite/client/config/RuneLiteConfig.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/Notifier.java b/runelite-client/src/main/java/net/runelite/client/Notifier.java index fc3083c997..335ca78551 100644 --- a/runelite-client/src/main/java/net/runelite/client/Notifier.java +++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java @@ -98,7 +98,6 @@ public class Notifier .build(); // Notifier properties - private static final Color FLASH_COLOR = new Color(255, 0, 0, 70); private static final int MINIMUM_FLASH_DURATION_MILLIS = 2000; private static final int MINIMUM_FLASH_DURATION_TICKS = MINIMUM_FLASH_DURATION_MILLIS / Constants.CLIENT_TICK_LENGTH; @@ -248,7 +247,7 @@ public class Notifier } final Color color = graphics.getColor(); - graphics.setColor(FLASH_COLOR); + graphics.setColor(runeLiteConfig.notificationFlashColor()); graphics.fill(new Rectangle(client.getCanvas().getSize())); graphics.setColor(color); } diff --git a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java index 81bbfab84f..f0f652aea8 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java @@ -256,6 +256,19 @@ public interface RuneLiteConfig extends Config return false; } + @Alpha + @ConfigItem( + keyName = "notificationFlashColor", + name = "Notification Flash Color", + description = "Sets the color of the notification flashes.", + position = 26, + section = notificationSettings + ) + default Color notificationFlashColor() + { + return new Color(255, 0, 0, 70); + } + @ConfigItem( keyName = "fontType", name = "Dynamic Overlay Font",