From f1810f20308dd2ce0bafc4c2ced15905fa61d890 Mon Sep 17 00:00:00 2001 From: CloneWith Date: Thu, 20 Jun 2024 11:59:11 +0800 Subject: [PATCH] Add switch to tint warning arrow white --- src/itdelatrisu/opsu/options/OptionGroup.java | 1 + src/itdelatrisu/opsu/options/Options.java | 9 +++++++++ src/itdelatrisu/opsu/states/Game.java | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/itdelatrisu/opsu/options/OptionGroup.java b/src/itdelatrisu/opsu/options/OptionGroup.java index 47fd7042..994f98fc 100644 --- a/src/itdelatrisu/opsu/options/OptionGroup.java +++ b/src/itdelatrisu/opsu/options/OptionGroup.java @@ -93,6 +93,7 @@ public class OptionGroup { GameOption.IGNORE_BEATMAP_SKINS, GameOption.FORCE_SKIN_CURSOR, GameOption.CURSOR_SIZE, + GameOption.WARNINGARROW_TINT_WHITE, }), new OptionGroup("Input", GameImage.MENU_NAV_INPUT), new OptionGroup("MOUSE", new GameOption[] { diff --git a/src/itdelatrisu/opsu/options/Options.java b/src/itdelatrisu/opsu/options/Options.java index 41ea33fc..3e56cec9 100644 --- a/src/itdelatrisu/opsu/options/Options.java +++ b/src/itdelatrisu/opsu/options/Options.java @@ -524,6 +524,7 @@ public void read(String s) { val = i; } }, + WARNINGARROW_TINT_WHITE ("Tint warning arrow white", "TintWarnArrowWhite", "Tine the warning arrow appeared before the end of a break period white instead of red.\nThis overrides the skin settings.", true), DYNAMIC_BACKGROUND ("Dynamic backgrounds", "DynamicBackground", "The current beatmap background will be used as the main menu background.", true), LOAD_VERBOSE ("Detailed loading progress", "LoadVerbose", "Display more verbose loading progress in the splash screen.", false), MASTER_VOLUME ("Master", "VolumeUniversal", "Global volume level.", 35, 0, 100) { @@ -1135,6 +1136,14 @@ public static void setDisplayMode(Container app) { */ public static boolean isComboBurstEnabled() { return GameOption.SHOW_COMBO_BURSTS.getBooleanValue(); } + /** + * Returns whether or not warningarrow is tinted white + * @return true if enabled + */ + public static boolean isWarningArrowTintWhite() { + return GameOption.WARNINGARROW_TINT_WHITE.getBooleanValue(); + } + /** * Returns the cursor scale. * @return the scale [0.5, 2] diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 31d8ed1b..324009bc 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -581,7 +581,7 @@ else if (breakIndex > 1) { if ((endTimeDiff > 1500 && endTimeDiff < 2000) || (endTimeDiff > 500 && endTimeDiff < 1000)) { Image arrow = GameImage.WARNINGARROW.getImage(); - Color color = (Options.getSkin().getVersion() == 1) ? Color.white : Color.red; + Color color = (Options.isWarningArrowTintWhite() || Options.getSkin().getVersion() == 1) ? Color.white : Color.red; arrow.setRotation(0); arrow.draw(width * 0.15f, height * 0.15f, color); arrow.draw(width * 0.15f, height * 0.75f, color);