Cancel state change on debug menu

This commit is contained in:
Lasercar 2025-02-23 13:23:28 +10:00 committed by Lasercar
parent 5054c58dca
commit e0b40ec0f4
2 changed files with 9 additions and 0 deletions
source/funkin/ui

View file

@ -172,6 +172,12 @@ class MenuTypedList<T:MenuListItem> extends FlxTypedGroup<T>
}
}
public function cancelAccept()
{
FlxFlicker.stopFlickering(members[selectedIndex]);
busy = false;
}
public function selectItem(index:Int)
{
members[selectedIndex].idle();

View file

@ -353,6 +353,9 @@ class MainMenuState extends MusicBeatState
{
persistentUpdate = false;
// Cancel the currently flickering menu item because it's about to call a state switch
if (menuItems.busy) menuItems.cancelAccept();
FlxG.state.openSubState(new DebugMenuSubState());
}