mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 13:27:23 +08: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;
|
didClick = true;
|
||||||
colourContainer.ResizeTo(new Vector2(1.5f, 1f), clickDuration, EasingTypes.In);
|
colourContainer.ResizeTo(new Vector2(1.5f, 1f), clickDuration, EasingTypes.In);
|
||||||
|
flash();
|
||||||
SampleClick?.Play();
|
SampleClick?.Play();
|
||||||
Action?.Invoke();
|
Action?.Invoke();
|
||||||
|
|
||||||
@ -101,6 +102,22 @@ namespace osu.Game.Overlays.Pause
|
|||||||
didClick = false;
|
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()
|
private void reapplyGlow()
|
||||||
{
|
{
|
||||||
if (leftGlow == null || centerGlow == null || rightGlow == null) return;
|
if (leftGlow == null || centerGlow == null || rightGlow == null) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user