From 1b1506150d39a48a99afc102c07b1ca6ff0d363d Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:19:12 +0100 Subject: [PATCH] options now works in the pause menu --- buildnumber.txt | 2 +- source/funkin/menus/PauseSubState.hx | 3 +++ source/funkin/options/Options.hx | 2 +- source/funkin/options/OptionsMenu.hx | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 6f7cc073..039a4fd1 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1466 \ No newline at end of file +1467 \ No newline at end of file diff --git a/source/funkin/menus/PauseSubState.hx b/source/funkin/menus/PauseSubState.hx index 43b14107..86c2e1be 100644 --- a/source/funkin/menus/PauseSubState.hx +++ b/source/funkin/menus/PauseSubState.hx @@ -1,5 +1,6 @@ package funkin.menus; +import funkin.options.OptionsMenu; import flixel.FlxCamera; import funkin.scripting.events.PauseCreationEvent; import funkin.scripting.events.NameEvent; @@ -143,6 +144,8 @@ class PauseSubState extends MusicBeatSubstate case "Change Controls": persistentDraw = false; openSubState(new KeybindsOptions()); + case "Options": + FlxG.switchState(new OptionsMenu(true)); case "Exit to menu": FlxG.switchState(new MainMenuState()); } diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx index f67f479a..34ebdbac 100644 --- a/source/funkin/options/Options.hx +++ b/source/funkin/options/Options.hx @@ -161,6 +161,7 @@ class Options }); __eventAdded = true; } + FlxG.sound.volume = volume; applySettings(); } @@ -168,7 +169,6 @@ class Options PlayerSettings.player1.setKeyboardScheme(Solo); FlxG.game.stage.quality = (FlxG.forceNoAntialiasing = !antialiasing) ? LOW : BEST; FlxG.autoPause = autoPause; - FlxG.sound.volume = volume; } public static function save() { diff --git a/source/funkin/options/OptionsMenu.hx b/source/funkin/options/OptionsMenu.hx index 099b9ff9..067daea8 100644 --- a/source/funkin/options/OptionsMenu.hx +++ b/source/funkin/options/OptionsMenu.hx @@ -74,6 +74,8 @@ class OptionsMenu extends MusicBeatState { } add(alphabets); changeSelection(1); + + CoolUtil.playMenuMusic(); } public override function update(elapsed:Float) {