1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Moved delaying resuming to Player

This commit is contained in:
DrabWeb 2017-01-30 09:06:26 -04:00
parent af8294f02c
commit 740f6e5595
2 changed files with 10 additions and 3 deletions

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Pause
case Key.Escape:
if (State == Visibility.Hidden) return false;
Hide();
Task.Delay(transitionDuration * 2).ContinueWith(task => OnResume?.Invoke());
OnResume?.Invoke();
return true;
}
return base.OnKeyDown(state, args);
@ -119,7 +119,7 @@ namespace osu.Game.Overlays.Pause
Action = delegate
{
Hide();
Task.Delay(transitionDuration * 2).ContinueWith(task => OnResume?.Invoke());
OnResume?.Invoke();
}
},
new RetryButton

View File

@ -117,7 +117,14 @@ namespace osu.Game.Screens.Play
scoreOverlay.BindProcessor(scoreProcessor = ruleset.CreateScoreProcessor(beatmap.HitObjects.Count));
pauseOverlay = new PauseOverlay { Depth = -1 };
pauseOverlay.OnResume = Resume;
pauseOverlay.OnResume = delegate
{
Delay(400);
Schedule(() =>
{
Resume();
});
};
pauseOverlay.OnRetry = Restart;
pauseOverlay.OnQuit = Exit;