mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Added flash when clicking a PauseButton
This commit is contained in:
parent
fe09bab78f
commit
bf54ae86ea
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user