Skip to content

Commit

Permalink
Add switch to tint warning arrow white
Browse files Browse the repository at this point in the history
  • Loading branch information
CloneWith committed Jun 20, 2024
1 parent dffeff7 commit f1810f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/itdelatrisu/opsu/options/OptionGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down
9 changes: 9 additions & 0 deletions src/itdelatrisu/opsu/options/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/itdelatrisu/opsu/states/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f1810f2

Please sign in to comment.