Added flash when clicking a PauseButton

This commit is contained in:
DrabWeb 2017-01-31 08:07:05 -04:00
parent fe09bab78f
commit bf54ae86ea

View File

@ -65,6 +65,7 @@ namespace osu.Game.Overlays.Pause
{
didClick = true;
colourContainer.ResizeTo(new Vector2(1.5f, 1f), clickDuration, EasingTypes.In);
flash();
SampleClick?.Play();
Action?.Invoke();
@ -101,6 +102,22 @@ namespace osu.Game.Overlays.Pause
didClick = false;
}
private void flash()
{
var flash = new Box
{
RelativeSizeAxes = Axes.Both
};
colourContainer.Add(flash);
flash.Colour = ButtonColour;
flash.BlendingMode = BlendingMode.Additive;
flash.Alpha = 0.3f;
flash.FadeOutFromOne(clickDuration);
flash.Expire();
}
private void reapplyGlow()
{
if (leftGlow == null || centerGlow == null || rightGlow == null) return;