From c1b48c6cbf65ff20b2abe08f6cb9fb276cb11e9f Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 3 Apr 2017 12:17:53 +0300 Subject: [PATCH] FadeIn/Out --- osu.Game/Modes/UI/HudOverlay.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game/Modes/UI/HudOverlay.cs b/osu.Game/Modes/UI/HudOverlay.cs index a259f2d09f..a070afb889 100644 --- a/osu.Game/Modes/UI/HudOverlay.cs +++ b/osu.Game/Modes/UI/HudOverlay.cs @@ -19,6 +19,9 @@ namespace osu.Game.Modes.UI { public abstract class HudOverlay : Container { + private const int duration = 100; + + private readonly Container hud; public readonly KeyCounterCollection KeyCounter; public readonly ComboCounter ComboCounter; public readonly ScoreCounter ScoreCounter; @@ -28,8 +31,6 @@ namespace osu.Game.Modes.UI private Bindable showKeyCounter; private Bindable showHud; - private readonly Container hud; - private static bool has_shown_notification_once = false; protected abstract KeyCounterCollection CreateKeyCounter(); @@ -90,9 +91,9 @@ namespace osu.Game.Modes.UI private void hudVisibilityChanged(object sender, EventArgs e) { if (showHud) - hud.Show(); + hud.FadeIn(duration); else - hud.Hide(); + hud.FadeOut(duration); } public void BindProcessor(ScoreProcessor processor)