From 2db0466722949ca98693eccd46bf80ad149816a0 Mon Sep 17 00:00:00 2001 From: MrTheMake Date: Wed, 21 Jun 2017 02:47:11 +0200 Subject: [PATCH] Readded color flash and simplify logic --- osu.Game/Graphics/UserInterface/IconButton.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/IconButton.cs b/osu.Game/Graphics/UserInterface/IconButton.cs index 8d7f223624..c6fb3d1896 100644 --- a/osu.Game/Graphics/UserInterface/IconButton.cs +++ b/osu.Game/Graphics/UserInterface/IconButton.cs @@ -54,14 +54,14 @@ namespace osu.Game.Graphics.UserInterface content.ScaleTo(1, 200, EasingTypes.OutElastic); if (Hovering) - hover.FadeOut(200, EasingTypes.OutQuint); + OnHoverLost(new InputState()); } else { FadeColour(Color4.White, 200, EasingTypes.OutQuint); - if(Hovering) - hover.FadeIn(500, EasingTypes.OutQuint); + if (Hovering) + OnHover(new InputState()); } } } @@ -135,6 +135,7 @@ namespace osu.Game.Graphics.UserInterface protected override bool OnClick(InputState state) { + hover.FlashColour(flashColour, 800, EasingTypes.OutQuint); return base.OnClick(state); }