mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Move graceful exit to OsuGameBase
This commit is contained in:
parent
6002014f95
commit
9e15dccc56
@ -918,18 +918,6 @@ namespace osu.Game
|
||||
return base.OnExiting();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use to programatically exit the game as if the user was triggering via alt-f4.
|
||||
/// Will keep persisting until an exit occurs (exit may be blocked multiple times).
|
||||
/// </summary>
|
||||
public void GracefullyExit()
|
||||
{
|
||||
if (!OnExiting())
|
||||
Exit();
|
||||
else
|
||||
Scheduler.AddDelayed(GracefullyExit, 2000);
|
||||
}
|
||||
|
||||
protected override void UpdateAfterChildren()
|
||||
{
|
||||
base.UpdateAfterChildren();
|
||||
|
@ -368,6 +368,18 @@ namespace osu.Game
|
||||
LocalConfig ??= new OsuConfigManager(Storage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use to programatically exit the game as if the user was triggering via alt-f4.
|
||||
/// Will keep persisting until an exit occurs (exit may be blocked multiple times).
|
||||
/// </summary>
|
||||
public void GracefullyExit()
|
||||
{
|
||||
if (!OnExiting())
|
||||
Exit();
|
||||
else
|
||||
Scheduler.AddDelayed(GracefullyExit, 2000);
|
||||
}
|
||||
|
||||
protected override Storage CreateStorage(GameHost host, Storage defaultStorage) => new OsuStorage(host, defaultStorage);
|
||||
|
||||
private readonly List<ICanAcceptFiles> fileImporters = new List<ICanAcceptFiles>();
|
||||
|
Loading…
Reference in New Issue
Block a user