Flash buttons on click.

This commit is contained in:
Dean Herbert 2017-04-08 19:28:29 +09:00
parent e40ad69a3b
commit e1e9772d46
1 changed files with 8 additions and 0 deletions

View File

@ -423,6 +423,7 @@ public FontAwesome Icon
}
private const float button_size = 30;
private Color4 flashColour;
public Vector2 IconScale
{
@ -475,6 +476,7 @@ public Button()
private void load(OsuColour colours)
{
hover.Colour = colours.Yellow.Opacity(0.6f);
flashColour = colours.Yellow;
}
protected override bool OnHover(InputState state)
@ -489,6 +491,12 @@ protected override void OnHoverLost(InputState state)
base.OnHoverLost(state);
}
protected override bool OnClick(InputState state)
{
hover.FlashColour(flashColour, 800, EasingTypes.OutQuint);
return base.OnClick(state);
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{
content.ScaleTo(0.75f, 2000, EasingTypes.OutQuint);