notifier: make flash color configurable

Co-authored-by: Snowflak3 <mitchellgn@yahoo.com>
This commit is contained in:
Snowflak3
2020-07-20 18:00:01 -05:00
committed by GitHub
parent f79f1c2390
commit 05c4a5c1d5
2 changed files with 14 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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",