Add ability to select current match

This commit is contained in:
Dean Herbert
2018-11-07 01:20:32 +09:00
parent 555d63165b
commit a0d64c1b13
10 changed files with 88 additions and 24 deletions

View File

@ -15,7 +15,6 @@ using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Tournament.Screens.Ladder.Components;
namespace osu.Game.Tournament
{
@ -31,9 +30,6 @@ namespace osu.Game.Tournament
[Cached]
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
[Cached]
private readonly Bindable<MatchPairing> currentMatch = new Bindable<MatchPairing>();
private Bindable<Size> windowSize;
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
@ -95,6 +91,8 @@ namespace osu.Game.Tournament
foreach (var id in group.Pairings)
Ladder.Pairings.Single(p => p.ID == id).Grouping.Value = group;
Ladder.CurrentMatch.Value = Ladder.Pairings.FirstOrDefault(p => p.Current.Value);
foreach (var g in Ladder.Groupings)
foreach (var b in g.Beatmaps)
if (b.BeatmapInfo == null)
@ -106,9 +104,6 @@ namespace osu.Game.Tournament
addedInfo = true;
}
//todo: temp
currentMatch.Value = Ladder.Pairings.FirstOrDefault();
if (addedInfo)
SaveChanges();