Disable watching replays from realtime results screen

This commit is contained in:
smoogipoo
2020-12-21 00:14:54 +09:00
parent 07077b8f4e
commit 5b4197a9ef
3 changed files with 16 additions and 13 deletions

View File

@ -57,11 +57,13 @@ namespace osu.Game.Screens.Ranking
private APIRequest nextPageRequest;
private readonly bool allowRetry;
private readonly bool allowWatchingReplay;
protected ResultsScreen(ScoreInfo score, bool allowRetry)
protected ResultsScreen(ScoreInfo score, bool allowRetry, bool allowWatchingReplay = true)
{
Score = score;
this.allowRetry = allowRetry;
this.allowWatchingReplay = allowWatchingReplay;
SelectedScore.Value = score;
}
@ -128,15 +130,7 @@ namespace osu.Game.Screens.Ranking
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(5),
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{
new ReplayDownloadButton(null)
{
Score = { BindTarget = SelectedScore },
Width = 300
},
}
Direction = FillDirection.Horizontal
}
}
}
@ -157,6 +151,15 @@ namespace osu.Game.Screens.Ranking
ScorePanelList.AddScore(Score, shouldFlair);
}
if (allowWatchingReplay)
{
buttons.Add(new ReplayDownloadButton(null)
{
Score = { BindTarget = SelectedScore },
Width = 300
});
}
if (player != null && allowRetry)
{
buttons.Add(new RetryButton { Width = 300 });