mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Disable watching replays from realtime results screen
This commit is contained in:
@ -32,8 +32,8 @@ namespace osu.Game.Screens.Multi.Ranking
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
public TimeshiftResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem, bool allowRetry)
|
public TimeshiftResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem, bool allowRetry, bool allowWatchingReplay = true)
|
||||||
: base(score, allowRetry)
|
: base(score, allowRetry, allowWatchingReplay)
|
||||||
{
|
{
|
||||||
this.roomId = roomId;
|
this.roomId = roomId;
|
||||||
this.playlistItem = playlistItem;
|
this.playlistItem = playlistItem;
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
|||||||
public class RealtimeResultsScreen : TimeshiftResultsScreen
|
public class RealtimeResultsScreen : TimeshiftResultsScreen
|
||||||
{
|
{
|
||||||
public RealtimeResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem)
|
public RealtimeResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem)
|
||||||
: base(score, roomId, playlistItem, false)
|
: base(score, roomId, playlistItem, false, false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,11 +57,13 @@ namespace osu.Game.Screens.Ranking
|
|||||||
private APIRequest nextPageRequest;
|
private APIRequest nextPageRequest;
|
||||||
|
|
||||||
private readonly bool allowRetry;
|
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;
|
Score = score;
|
||||||
this.allowRetry = allowRetry;
|
this.allowRetry = allowRetry;
|
||||||
|
this.allowWatchingReplay = allowWatchingReplay;
|
||||||
|
|
||||||
SelectedScore.Value = score;
|
SelectedScore.Value = score;
|
||||||
}
|
}
|
||||||
@ -128,15 +130,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Spacing = new Vector2(5),
|
Spacing = new Vector2(5),
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new ReplayDownloadButton(null)
|
|
||||||
{
|
|
||||||
Score = { BindTarget = SelectedScore },
|
|
||||||
Width = 300
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,6 +151,15 @@ namespace osu.Game.Screens.Ranking
|
|||||||
ScorePanelList.AddScore(Score, shouldFlair);
|
ScorePanelList.AddScore(Score, shouldFlair);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (allowWatchingReplay)
|
||||||
|
{
|
||||||
|
buttons.Add(new ReplayDownloadButton(null)
|
||||||
|
{
|
||||||
|
Score = { BindTarget = SelectedScore },
|
||||||
|
Width = 300
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (player != null && allowRetry)
|
if (player != null && allowRetry)
|
||||||
{
|
{
|
||||||
buttons.Add(new RetryButton { Width = 300 });
|
buttons.Add(new RetryButton { Width = 300 });
|
||||||
|
Reference in New Issue
Block a user