From bd551092dc70d8eceb4dade74f25af0e681f61b2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 29 Apr 2024 23:31:55 -0400 Subject: [PATCH] persistentUpdate true main menu --- source/funkin/ui/mainmenu/MainMenuState.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/mainmenu/MainMenuState.hx b/source/funkin/ui/mainmenu/MainMenuState.hx index b4631d74d..11c7c6ebf 100644 --- a/source/funkin/ui/mainmenu/MainMenuState.hx +++ b/source/funkin/ui/mainmenu/MainMenuState.hx @@ -54,7 +54,7 @@ class MainMenuState extends MusicBeatState playMenuMusic(); - persistentUpdate = false; + persistentUpdate = true; persistentDraw = true; var bg:FlxSprite = new FlxSprite(Paths.image('menuBG')); @@ -103,6 +103,7 @@ class MainMenuState extends MusicBeatState // Freeplay has its own custom transition FlxTransitionableState.skipNextTransIn = true; FlxTransitionableState.skipNextTransOut = true; + openSubState(new FreeplayState()); }); @@ -274,6 +275,8 @@ class MainMenuState extends MusicBeatState public function openPrompt(prompt:Prompt, onClose:Void->Void):Void { menuItems.enabled = false; + persistentUpdate = false; + prompt.closeCallback = function() { menuItems.enabled = true; if (onClose != null) onClose(); @@ -326,6 +329,8 @@ class MainMenuState extends MusicBeatState #if CHART_EDITOR_SUPPORTED if (controls.DEBUG_MENU) { + persistentUpdate = false; + FlxG.state.openSubState(new DebugMenuSubState()); } #end