1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:57:52 +08:00
osu-lazer/osu.Game.Tournament.Tests/TestCaseMapPool.cs

44 lines
1.2 KiB
C#
Raw Normal View History

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;
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
{
[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)
{
FillFlowContainer maps;
2018-10-14 17:09:22 +08:00
InternalChildren = new Drawable[]
{
maps = new FillFlowContainer
{
Direction = FillDirection.Full,
RelativeSizeAxes = Axes.Both,
},
};
foreach (var b in round.Beatmaps)
maps.Add(new TournamentBeatmapPanel(b.BeatmapInfo));
2018-10-14 17:09:22 +08:00
}
}
}