option to disable star fountains in main menu

This commit is contained in:
yugecin 2018-10-19 20:29:30 +02:00
parent 3d6801d935
commit f79b030ccb
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44
3 changed files with 10 additions and 3 deletions

View File

@ -287,7 +287,9 @@ public class MainMenu extends BaseOpsuState {
Colors.BLACK_ALPHA.a = oldAlpha; Colors.BLACK_ALPHA.a = oldAlpha;
// draw star fountain // draw star fountain
starFountain.draw(); if (OPTION_STARFOUNTAINS.state) {
starFountain.draw();
}
// draw downloads button // draw downloads button
downloadsButton.draw(); downloadsButton.draw();
@ -521,7 +523,9 @@ public class MainMenu extends BaseOpsuState {
for (MenuButton b : this.musicButtons) { for (MenuButton b : this.musicButtons) {
b.hoverUpdate(delta, b.contains(mouseX, mouseY)); b.hoverUpdate(delta, b.contains(mouseX, mouseY));
} }
starFountain.update(delta); if (OPTION_STARFOUNTAINS.state) {
starFountain.update(delta);
}
// window focus change: increase/decrease theme song volume // window focus change: increase/decrease theme song volume
if (MusicController.isThemePlaying() && if (MusicController.isThemePlaying() &&
@ -536,7 +540,7 @@ public class MainMenu extends BaseOpsuState {
// check measure progress // check measure progress
Float measureProgress = MusicController.getMeasureProgress(2); Float measureProgress = MusicController.getMeasureProgress(2);
if (measureProgress != null) { if (measureProgress != null) {
if (measureProgress < lastMeasureProgress) if (OPTION_STARFOUNTAINS.state && measureProgress < lastMeasureProgress)
starFountain.burst(true); starFountain.burst(true);
lastMeasureProgress = measureProgress; lastMeasureProgress = measureProgress;
} }

View File

@ -42,6 +42,7 @@ public class OptionGroups {
OPTION_TARGET_FPS, OPTION_TARGET_FPS,
OPTION_SHOW_FPS, OPTION_SHOW_FPS,
OPTION_USE_FPS_DELTAS, OPTION_USE_FPS_DELTAS,
OPTION_STARFOUNTAINS,
OPTION_SCREENSHOT_FORMAT, OPTION_SCREENSHOT_FORMAT,
}), }),
new OptionTab("SLIDER OPTIONS", new Option[]{ new OptionTab("SLIDER OPTIONS", new Option[]{

View File

@ -127,6 +127,8 @@ public class Options {
public static final ToggleOption OPTION_NOSINGLEINSTANCE = new ToggleOption("-", "NoSingleInstance", "-", false); public static final ToggleOption OPTION_NOSINGLEINSTANCE = new ToggleOption("-", "NoSingleInstance", "-", false);
public static final ToggleOption OPTION_STARFOUNTAINS = new ToggleOption("Star fountains in main menu", "StarFountains", "Show star bursts in main menu", true);
// in-game options // in-game options
public static final ListOption OPTION_SCREEN_RESOLUTION = new ListOption("Screen Resolution", "ScreenResolution", "Change the size of the game.") { public static final ListOption OPTION_SCREEN_RESOLUTION = new ListOption("Screen Resolution", "ScreenResolution", "Change the size of the game.") {
private final String[] resolutions = { private final String[] resolutions = {