1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:43:21 +08:00

Add back retry overlay

This commit is contained in:
smoogipoo 2020-03-17 17:45:25 +09:00
parent 1c4296f5e7
commit 86a336d585

View File

@ -10,6 +10,7 @@ using osu.Framework.Screens;
using osu.Game.Graphics.UserInterface;
using osu.Game.Scoring;
using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Play;
using osuTK;
namespace osu.Game.Screens.Ranking
@ -25,6 +26,9 @@ namespace osu.Game.Screens.Ranking
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap.Value);
[Resolved(CanBeNull = true)]
private Player player { get; set; }
private readonly ScoreInfo score;
private Drawable bottomPanel;
@ -75,6 +79,19 @@ namespace osu.Game.Screens.Ranking
}
}
};
if (player != null)
{
AddInternal(new HotkeyRetryOverlay
{
Action = () =>
{
if (!this.IsCurrentScreen()) return;
player?.Restart();
},
});
}
}
public override void OnEntering(IScreen last)