mirror of https://github.com/ppy/osu
Add flash when activating the osu! logo.
This commit is contained in:
parent
50e4c39e32
commit
9b2669e1ae
|
@ -12,6 +12,7 @@
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
@ -63,6 +64,7 @@ public bool Ripple
|
||||||
|
|
||||||
public bool Interactive = true;
|
public bool Interactive = true;
|
||||||
private Box colourLayer;
|
private Box colourLayer;
|
||||||
|
private Box flashLayer;
|
||||||
|
|
||||||
public OsuLogo()
|
public OsuLogo()
|
||||||
{
|
{
|
||||||
|
@ -112,7 +114,13 @@ public OsuLogo()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
flashLayer = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
BlendingMode = BlendingMode.Additive,
|
||||||
|
Colour = Color4.White,
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
logo = new Sprite
|
logo = new Sprite
|
||||||
|
@ -191,6 +199,10 @@ protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
if (!Interactive) return false;
|
if (!Interactive) return false;
|
||||||
|
|
||||||
|
flashLayer.ClearTransformations();
|
||||||
|
flashLayer.Alpha = 0.4f;
|
||||||
|
flashLayer.FadeOut(1500, EasingTypes.OutExpo);
|
||||||
|
|
||||||
Action?.Invoke();
|
Action?.Invoke();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue