1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00
This commit is contained in:
Dean Herbert 2018-09-25 10:27:54 +09:00
parent a5888feca4
commit 991d85a9f3
8 changed files with 10 additions and 55 deletions

View File

@ -4,7 +4,6 @@
using System.IO;
using Newtonsoft.Json;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Graphics.Cursor;
using osu.Game.Tests.Visual;
@ -18,9 +17,6 @@ namespace osu.Game.Tournament.Tests
[Cached]
private readonly LadderManager manager;
[Cached]
private Bindable<TournamentConditions> conditions = new Bindable<TournamentConditions>(new TournamentConditions());
public TestCaseLadderManager()
{
var ladder = File.Exists(@"bracket.json") ? JsonConvert.DeserializeObject<LadderInfo>(File.ReadAllText(@"bracket.json")) : new LadderInfo();

View File

@ -3,8 +3,6 @@
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Tests.Visual;
@ -23,9 +21,6 @@ namespace osu.Game.Tournament.Tests
typeof(DrawableTournamentTeam),
};
[Cached]
private Bindable<TournamentConditions> conditions = new Bindable<TournamentConditions>(new TournamentConditions());
public TestCaseMatchPairings()
{
Container<DrawableMatchPairing> level1;

View File

@ -19,7 +19,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
{
public readonly MatchPairing Pairing;
private readonly FillFlowContainer<DrawableMatchTeam> flow;
private readonly Bindable<TournamentConditions> conditions = new Bindable<TournamentConditions>();
private readonly Drawable selectionBox;
private Bindable<MatchPairing> globalSelection;
@ -70,15 +69,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
updateTeams();
}
[BackgroundDependencyLoader(true)]
private void load(Bindable<TournamentConditions> conditions)
{
this.conditions.BindValueChanged(_ => updateWinConditions());
if (conditions != null)
this.conditions.BindTo(conditions);
}
private bool selected;
public bool Selected
@ -123,7 +113,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
private void updateWinConditions()
{
if (conditions.Value == null || Pairing.Grouping.Value == null) return;
if (Pairing.Grouping.Value == null) return;
var instaWinAmount = Pairing.Grouping.Value.BestOf / 2;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Framework.Configuration;
using osu.Game.Tournament.Components;

View File

@ -85,32 +85,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
LabelText = "Losers Bracket",
Bindable = new Bindable<bool>()
}
// new Container
// {
// RelativeSizeAxes = Axes.X,
// AutoSizeAxes = Axes.Y,
// Padding = new MarginPadding { Horizontal = padding },
// Children = new Drawable[]
// {
// new OsuSpriteText
// {
// Anchor = Anchor.CentreLeft,
// Origin = Anchor.CentreLeft,
// Text = "Best of",
// },
// },
// },
// sliderBestOf = new PlayerSliderBar<double>
// {
// Bindable = new BindableDouble
// {
// Default = 11,
// Value = 11,
// MinValue = 1,
// MaxValue = 21,
// Precision = 1,
// },
// }
};
editorInfo.Selected.ValueChanged += selection =>

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Lines;

View File

@ -1,9 +0,0 @@
namespace osu.Game.Tournament.Screens.Ladder.Components
{
/// <summary>
/// Conditions governing a tournament.
/// </summary>
public class TournamentConditions
{
}
}

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;