mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Kludge-fix being able to play music in editor
When you're on the music changing screen in the editor, it plays the current track. When you return, it stops playing the track. However, if you press escape, it doesn't stop playing the track. This is because pressing escape just returns to the previous menu without stopping playing the track. To fix this, I just added some kludge in the return menu function. This is kinda super bad but it works for now and is just something to clean up later. Maybe like each menu having exit callbacks or something, I dunno. This is kinda a regression, kinda sorta not. In 2.2 and previous, pressing escape would just close the settings menu entirely, which also bypassed the music fadeout. 2.3 made it so pressing escape doesn't entirely close the settings menu, and just returns to the previous menu, which fails in a different way. But the intended way is definitely to select the return option and having the music fade out.
This commit is contained in:
parent
e3bfc79d4a
commit
06a88eff39
1 changed files with 6 additions and 0 deletions
|
@ -5838,6 +5838,12 @@ void Game::returnmenu(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Super bad kludge, don't hardcode this! */
|
||||||
|
if (currentmenuname == Menu::ed_music)
|
||||||
|
{
|
||||||
|
music.fadeout();
|
||||||
|
}
|
||||||
|
|
||||||
MenuStackFrame& frame = menustack[menustack.size()-1];
|
MenuStackFrame& frame = menustack[menustack.size()-1];
|
||||||
|
|
||||||
//Store this in case createmenu() removes the stack frame
|
//Store this in case createmenu() removes the stack frame
|
||||||
|
|
Loading…
Reference in a new issue