1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-19 04:57:46 +08:00

Apply code styling suggestions

This commit is contained in:
Dean Herbert 2019-09-19 22:46:21 +09:00
parent 4e9bb7b121
commit 67796e0982

View File

@ -87,11 +87,7 @@ namespace osu.Game.Screens.Menu
OnEdit = delegate { this.Push(new Editor()); },
OnSolo = onSolo,
OnMulti = delegate { this.Push(new Multiplayer()); },
OnExit = delegate
{
exitConfirmed = true;
this.Exit();
},
OnExit = confirmAndExit,
}
}
},
@ -120,6 +116,12 @@ namespace osu.Game.Screens.Menu
preloadSongSelect();
}
private void confirmAndExit()
{
exitConfirmed = true;
this.Exit();
}
private void preloadSongSelect()
{
if (songSelect == null)
@ -241,15 +243,7 @@ namespace osu.Game.Screens.Menu
{
if (holdDelay.Value == 0 && !exitConfirmed && dialogOverlay != null && !(dialogOverlay.CurrentDialog is ConfirmExitDialog))
{
dialogOverlay.Push(new ConfirmExitDialog(() =>
{
exitConfirmed = true;
this.Exit();
}, () =>
{
exitConfirmOverlay.Abort();
}));
dialogOverlay.Push(new ConfirmExitDialog(confirmAndExit, () => exitConfirmOverlay.Abort()));
return true;
}