mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Animate "Good bye" instead on exit
This commit is contained in:
parent
cc808a9eb1
commit
5d29ff29cb
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
@ -132,6 +133,8 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private void confirmAndExit()
|
||||
{
|
||||
if (exitConfirmed) return;
|
||||
|
||||
exitConfirmed = true;
|
||||
this.Exit();
|
||||
}
|
||||
@ -250,6 +253,12 @@ namespace osu.Game.Screens.Menu
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dialogOverlay.CurrentDialog is ConfirmExitDialog)
|
||||
{
|
||||
exitConfirmed = true;
|
||||
dialogOverlay.CurrentDialog.Buttons.First().Click();
|
||||
}
|
||||
|
||||
buttons.State = ButtonSystemState.Exit;
|
||||
this.FadeOut(3000);
|
||||
return base.OnExiting(next);
|
||||
|
Loading…
Reference in New Issue
Block a user