1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 10:53:21 +08:00

Also allow using "quick retry" for other replays

This commit is contained in:
Dean Herbert 2024-12-13 18:14:45 +09:00
parent 0e0d96829f
commit d00bc4bdd1
No known key found for this signature in database

View File

@ -84,6 +84,7 @@ namespace osu.Game.Screens.Ranking
/// </summary>
public bool ShowUserStatistics { get; init; }
// Only show the relevant button otherwise things look silly.
private Sample? popInSample;
protected ResultsScreen(ScoreInfo? score)
@ -186,6 +187,8 @@ namespace osu.Game.Screens.Ranking
Scheduler.AddDelayed(() => OverlayActivationMode.Value = OverlayActivation.All, shouldFlair ? AccuracyCircle.TOTAL_DURATION + 1000 : 0);
}
bool allowHotkeyRetry = false;
if (AllowWatchingReplay)
{
buttons.Add(new ReplayDownloadButton(SelectedScore.Value)
@ -193,12 +196,19 @@ namespace osu.Game.Screens.Ranking
Score = { BindTarget = SelectedScore },
Width = 300
});
// for simplicity, only allow when we're guaranteed the replay is already downloaded and present.
allowHotkeyRetry = player is ReplayPlayer;
}
if (player != null && AllowRetry)
{
buttons.Add(new RetryButton { Width = 300 });
allowHotkeyRetry = true;
}
if (allowHotkeyRetry)
{
AddInternal(new HotkeyRetryOverlay
{
Action = () =>