mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 02:03:51 +08:00
Merge branch 'master' into info-column-min-width
This commit is contained in:
commit
e8ea0dcc02
@ -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();
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user