fade effect when switching states

This commit is contained in:
2025-11-29 19:23:41 +01:00
parent a7d67b26a5
commit 332e2efb74
5 changed files with 71 additions and 21 deletions

View File

@ -267,7 +267,9 @@ void OptionsState::toggleSoundFx() {
}
void OptionsState::exitToMenu() {
if (ctx.stateManager) {
if (ctx.requestFadeTransition) {
ctx.requestFadeTransition(AppState::Menu);
} else if (ctx.stateManager) {
ctx.stateManager->setState(AppState::Menu);
}
}