2018-10-14 17:09:22 +08:00
|
|
|
// 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;
|
2018-10-16 14:20:12 +08:00
|
|
|
using osu.Framework.Allocation;
|
2018-10-14 17:09:22 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Tournament.Components;
|
|
|
|
using osu.Game.Tournament.Screens.Ladder.Components;
|
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Tests
|
|
|
|
{
|
|
|
|
public class TestCaseMapPool : LadderTestCase
|
|
|
|
{
|
2018-10-16 14:20:12 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
2018-10-14 17:09:22 +08:00
|
|
|
{
|
|
|
|
var round = Ladder.Groupings.First(g => g.Name == "Finals");
|
|
|
|
|
|
|
|
Add(new MapPoolScreen(round));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class MapPoolScreen : CompositeDrawable
|
|
|
|
{
|
|
|
|
public MapPoolScreen(TournamentGrouping round)
|
|
|
|
{
|
2018-10-16 14:20:12 +08:00
|
|
|
FillFlowContainer maps;
|
|
|
|
|
2018-10-14 17:09:22 +08:00
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
|
|
|
maps = new FillFlowContainer
|
|
|
|
{
|
|
|
|
Direction = FillDirection.Full,
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2018-10-16 14:20:12 +08:00
|
|
|
foreach (var b in round.Beatmaps)
|
|
|
|
maps.Add(new TournamentBeatmapPanel(b.BeatmapInfo));
|
2018-10-14 17:09:22 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|