1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 01:47:25 +08:00
osu-lazer/osu.Game/Screens/Play/FailDialog.cs

43 lines
1.3 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-01-20 15:51:43 +08:00
2017-02-17 17:59:30 +08:00
using osu.Framework.Screens;
2017-01-20 15:51:43 +08:00
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
2017-01-20 15:51:43 +08:00
using osu.Game.Screens.Backgrounds;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Screens.Play
{
2017-03-07 09:59:19 +08:00
internal class FailDialog : OsuScreen
2017-01-20 15:51:43 +08:00
{
2017-02-17 17:59:30 +08:00
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap);
2017-01-20 15:51:43 +08:00
2017-02-07 15:15:45 +08:00
private static readonly Vector2 background_blur = new Vector2(20);
2017-01-20 15:51:43 +08:00
public FailDialog()
{
Add(new OsuSpriteText
2017-01-20 15:51:43 +08:00
{
Text = "You failed!",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 50
});
}
2017-02-17 17:59:30 +08:00
protected override void OnEntering(Screen last)
2017-01-20 15:51:43 +08:00
{
base.OnEntering(last);
2017-02-17 17:59:30 +08:00
Background.Schedule(() => (Background as BackgroundScreenBeatmap)?.BlurTo(background_blur, 1000));
2017-01-20 15:51:43 +08:00
}
2017-02-17 17:59:30 +08:00
protected override bool OnExiting(Screen next)
2017-01-20 15:51:43 +08:00
{
Background.Schedule(() => Background.FadeColour(Color4.White, 500));
return base.OnExiting(next);
}
}
}