mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 12:22:56 +08:00
Rename GracefullyExit
to AttemptExit
This commit is contained in:
parent
f7fc456bb1
commit
50e40756c4
@ -154,7 +154,7 @@ namespace osu.Desktop.Updater
|
||||
Activated = () =>
|
||||
{
|
||||
updateManager.PrepareUpdateAsync()
|
||||
.ContinueWith(_ => updateManager.Schedule(() => game?.GracefullyExit()));
|
||||
.ContinueWith(_ => updateManager.Schedule(() => game?.AttemptExit()));
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
||||
dropdown.Items = storage.ListTournaments();
|
||||
dropdown.Current.BindValueChanged(v => Button.Enabled.Value = v.NewValue != startupTournament, true);
|
||||
|
||||
Action = () => game.GracefullyExit();
|
||||
Action = () => game.AttemptExit();
|
||||
folderButton.Action = () => storage.PresentExternally();
|
||||
|
||||
ButtonText = "Close osu!";
|
||||
|
@ -637,7 +637,7 @@ namespace osu.Game
|
||||
Add(performFromMainMenuTask = new PerformFromMenuRunner(action, validScreens, () => ScreenStack.CurrentScreen));
|
||||
}
|
||||
|
||||
public override void GracefullyExit()
|
||||
public override void AttemptExit()
|
||||
{
|
||||
// Using PerformFromScreen gives the user a chance to interrupt the exit process if needed.
|
||||
PerformFromScreen(menu => menu.Exit());
|
||||
|
@ -418,13 +418,14 @@ namespace osu.Game
|
||||
/// <summary>
|
||||
/// Use to programatically exit the game as if the user was triggering via alt-f4.
|
||||
/// By default, will keep persisting until an exit occurs (exit may be blocked multiple times).
|
||||
/// May be interrupted (see <see cref="OsuGame"/>'s override.
|
||||
/// </summary>
|
||||
public virtual void GracefullyExit()
|
||||
public virtual void AttemptExit()
|
||||
{
|
||||
if (!OnExiting())
|
||||
Exit();
|
||||
else
|
||||
Scheduler.AddDelayed(GracefullyExit, 2000);
|
||||
Scheduler.AddDelayed(AttemptExit, 2000);
|
||||
}
|
||||
|
||||
public bool Migrate(string path)
|
||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
dialogOverlay.Push(new ConfirmDialog("To complete this operation, osu! will close. Please open it again to use the new data location.", () =>
|
||||
{
|
||||
(storage as OsuStorage)?.ChangeDataPath(target.FullName);
|
||||
game.GracefullyExit();
|
||||
game.AttemptExit();
|
||||
}, () => { }));
|
||||
},
|
||||
() => { }));
|
||||
|
Loading…
Reference in New Issue
Block a user