1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Add flash when activating the osu! logo.

This commit is contained in:
Dean Herbert 2017-01-27 13:50:22 +09:00
parent 50e4c39e32
commit 9b2669e1ae

View File

@ -12,6 +12,7 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Input;
using osu.Framework.MathUtils;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
using OpenTK;
using OpenTK.Graphics;
@ -63,6 +64,7 @@ namespace osu.Game.Screens.Menu
public bool Interactive = true;
private Box colourLayer;
private Box flashLayer;
public OsuLogo()
{
@ -112,7 +114,13 @@ namespace osu.Game.Screens.Menu
},
}
},
flashLayer = new Box
{
RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive,
Colour = Color4.White,
Alpha = 0,
},
},
},
logo = new Sprite
@ -191,6 +199,10 @@ namespace osu.Game.Screens.Menu
{
if (!Interactive) return false;
flashLayer.ClearTransformations();
flashLayer.Alpha = 0.4f;
flashLayer.FadeOut(1500, EasingTypes.OutExpo);
Action?.Invoke();
return true;
}