From d4216eb5398f2b815e79639b9491ee21cae8c0d2 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 28 Jan 2017 20:45:10 -0400 Subject: [PATCH] Made resume not call until double the time of the fade animation --- osu.Game/Overlays/Pause/PauseOverlay.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs index ffa8955d46..93c3d8509d 100644 --- a/osu.Game/Overlays/Pause/PauseOverlay.cs +++ b/osu.Game/Overlays/Pause/PauseOverlay.cs @@ -9,6 +9,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transformations; +using System.Threading.Tasks; namespace osu.Game.Overlays.Pause { @@ -107,7 +108,7 @@ namespace osu.Game.Overlays.Pause Action = (delegate { Hide(); - OnResume?.Invoke(); + Task.Delay(fadeDuration * 2).ContinueWith(t=> OnResume?.Invoke()); }), }, new PauseButton @@ -154,7 +155,7 @@ namespace osu.Game.Overlays.Pause case Key.Escape: if (State == Visibility.Hidden) return false; Hide(); - OnResume?.Invoke(); + Task.Delay(fadeDuration * 2).ContinueWith(t => OnResume?.Invoke()); return true; } return base.OnKeyDown(state, args);