mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 03:23:03 +08:00
Add delay for exit process.
This commit is contained in:
parent
357c94ed8a
commit
463f606004
@ -36,6 +36,8 @@ namespace osu.Game.GameModes.Menu
|
||||
const float button_width = 180f;
|
||||
const float wedge_width = 25.6f;
|
||||
|
||||
public const int EXIT_DELAY = 3000;
|
||||
|
||||
private OsuLogo osuLogo;
|
||||
private Drawable iconFacade;
|
||||
private Container buttonArea;
|
||||
@ -221,9 +223,10 @@ namespace osu.Game.GameModes.Menu
|
||||
b.State = Button.ButtonState.Contracted;
|
||||
|
||||
osuLogo.Delay(150);
|
||||
osuLogo.ScaleTo(1f, 4000);
|
||||
osuLogo.RotateTo(20, 4000);
|
||||
osuLogo.FadeOut(4000);
|
||||
|
||||
osuLogo.ScaleTo(1f, EXIT_DELAY * 1.5f);
|
||||
osuLogo.RotateTo(20, EXIT_DELAY * 1.5f);
|
||||
osuLogo.FadeOut(EXIT_DELAY);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -21,16 +21,16 @@ namespace osu.Game.GameModes.Menu
|
||||
|
||||
//private AudioTrackBass bgm;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
base.Load();
|
||||
public override void Load()
|
||||
{
|
||||
base.Load();
|
||||
|
||||
AudioSample welcome = Game.Audio.Sample.Get(@"welcome");
|
||||
AudioSample welcome = Game.Audio.Sample.Get(@"welcome");
|
||||
welcome.Play();
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ButtonSystem()
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ButtonSystem()
|
||||
{
|
||||
OnChart = delegate { Push(new ChartListing()); },
|
||||
OnDirect = delegate { Push(new OnlineListing()); },
|
||||
@ -38,10 +38,16 @@ namespace osu.Game.GameModes.Menu
|
||||
OnSolo = delegate { Push(new SongSelectPlay()); },
|
||||
OnMulti = delegate { Push(new Lobby()); },
|
||||
OnTest = delegate { Push(new TestBrowser()); },
|
||||
OnExit = delegate { Game.Host.Exit(); },
|
||||
OnSettings = delegate { (Game as OsuGame).Options.PoppedOut = !(Game as OsuGame).Options.PoppedOut; },
|
||||
OnExit = delegate {
|
||||
Game.Scheduler.AddDelayed(delegate {
|
||||
Game.Host.Exit();
|
||||
}, ButtonSystem.EXIT_DELAY);
|
||||
},
|
||||
OnSettings = delegate {
|
||||
Game.Options.PoppedOut = !Game.Options.PoppedOut;
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user