mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 01:17:19 +08:00
Apply code styling suggestions
This commit is contained in:
parent
4e9bb7b121
commit
67796e0982
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user