1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-05 06:14:36 +00:00

Fix issue where main menu music wouldn't play after credits.

This commit is contained in:
EliteMasterEric 2024-03-28 02:57:51 -04:00
parent 5311b043ac
commit 3a86b47292

View file

@ -51,10 +51,7 @@ class MainMenuState extends MusicBeatState
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
if (!(FlxG?.sound?.music?.playing ?? false))
{
playMenuMusic();
}
playMenuMusic();
persistentUpdate = persistentDraw = true;
@ -109,15 +106,18 @@ class MainMenuState extends MusicBeatState
});
#if CAN_OPEN_LINKS
// In order to prevent popup blockers from triggering,
// we need to open the link as an immediate result of a keypress event,
// so we can't wait for the flicker animation to complete.
var hasPopupBlocker = #if web true #else false #end;
createMenuItem('donate', 'mainmenu/donate', selectDonate, hasPopupBlocker);
createMenuItem('merch', 'mainmenu/merch', selectMerch, hasPopupBlocker);
#end
createMenuItem('options', 'mainmenu/options', function() {
startExitState(() -> new funkin.ui.options.OptionsState());
});
createMenuItem('options', 'mainmenu/options', function() {
createMenuItem('credits', 'mainmenu/credits', function() {
startExitState(() -> new funkin.ui.credits.CreditsState());
});
@ -219,6 +219,11 @@ class MainMenuState extends MusicBeatState
{
WindowUtil.openURL(Constants.URL_ITCH);
}
function selectMerch()
{
WindowUtil.openURL(Constants.URL_MERCH);
}
#end
#if newgrounds