mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:53:01 +08:00
Made resume not call until double the time of the fade animation
This commit is contained in:
parent
6b57456681
commit
d4216eb539
@ -9,6 +9,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Pause
|
namespace osu.Game.Overlays.Pause
|
||||||
{
|
{
|
||||||
@ -107,7 +108,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
Action = (delegate
|
Action = (delegate
|
||||||
{
|
{
|
||||||
Hide();
|
Hide();
|
||||||
OnResume?.Invoke();
|
Task.Delay(fadeDuration * 2).ContinueWith(t=> OnResume?.Invoke());
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
new PauseButton
|
new PauseButton
|
||||||
@ -154,7 +155,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
case Key.Escape:
|
case Key.Escape:
|
||||||
if (State == Visibility.Hidden) return false;
|
if (State == Visibility.Hidden) return false;
|
||||||
Hide();
|
Hide();
|
||||||
OnResume?.Invoke();
|
Task.Delay(fadeDuration * 2).ContinueWith(t => OnResume?.Invoke());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return base.OnKeyDown(state, args);
|
return base.OnKeyDown(state, args);
|
||||||
|
Loading…
Reference in New Issue
Block a user