1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 13:22:55 +08:00

Merge branch 'master' into info-column-min-width

This commit is contained in:
Dan Balasescu 2020-02-12 13:45:16 +09:00 committed by GitHub
commit e8ea0dcc02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -446,7 +446,7 @@ namespace osu.Game
/// </summary>
/// <param name="action">The action to perform once we are in the correct state.</param>
/// <param name="validScreens">An optional collection of valid screen types. If any of these screens are already current we can perform the action immediately, else the first valid parent will be made current before performing the action. <see cref="MainMenu"/> is used if not specified.</param>
protected void PerformFromScreen(Action<IScreen> action, IEnumerable<Type> validScreens = null)
public void PerformFromScreen(Action<IScreen> action, IEnumerable<Type> validScreens = null)
{
performFromMainMenuTask?.Cancel();

View File

@ -141,12 +141,15 @@ namespace osu.Game.Screens.Menu
preloadSongSelect();
}
[Resolved]
private OsuGame game { get; set; }
private void confirmAndExit()
{
if (exitConfirmed) return;
exitConfirmed = true;
this.Exit();
game.PerformFromScreen(menu => menu.Exit());
}
private void preloadSongSelect()