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:
parent
af8294f02c
commit
740f6e5595
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user