1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 18:53:51 +08:00

Readded color flash and simplify logic

This commit is contained in:
MrTheMake 2017-06-21 02:47:11 +02:00
parent 70096b6c86
commit 2db0466722

View File

@ -54,14 +54,14 @@ namespace osu.Game.Graphics.UserInterface
content.ScaleTo(1, 200, EasingTypes.OutElastic); content.ScaleTo(1, 200, EasingTypes.OutElastic);
if (Hovering) if (Hovering)
hover.FadeOut(200, EasingTypes.OutQuint); OnHoverLost(new InputState());
} }
else else
{ {
FadeColour(Color4.White, 200, EasingTypes.OutQuint); FadeColour(Color4.White, 200, EasingTypes.OutQuint);
if (Hovering) if (Hovering)
hover.FadeIn(500, EasingTypes.OutQuint); OnHover(new InputState());
} }
} }
} }
@ -135,6 +135,7 @@ namespace osu.Game.Graphics.UserInterface
protected override bool OnClick(InputState state) protected override bool OnClick(InputState state)
{ {
hover.FlashColour(flashColour, 800, EasingTypes.OutQuint);
return base.OnClick(state); return base.OnClick(state);
} }