osu/osu.Game.Tournament.Tests/TestSceneTeamIntro.cs

35 lines
1.2 KiB
C#
Raw Normal View History

2019-03-04 04:24:19 +00:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-10-14 09:00:28 +00:00
using System.Linq;
using osu.Framework.Allocation;
2019-03-02 04:50:43 +00:00
using osu.Framework.Bindables;
using osu.Framework.Graphics;
2018-11-06 11:13:04 +00:00
using osu.Game.Tournament.Screens.Ladder.Components;
using osu.Game.Tournament.Screens.TeamIntro;
namespace osu.Game.Tournament.Tests
{
2019-06-14 08:25:07 +00:00
public class TestSceneTeamIntro : LadderTestScene
{
2018-11-06 11:13:04 +00:00
[Cached]
private readonly Bindable<MatchPairing> currentMatch = new Bindable<MatchPairing>();
[BackgroundDependencyLoader]
private void load()
{
2018-11-06 11:13:04 +00:00
var pairing = new MatchPairing();
pairing.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym == "USA");
pairing.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym == "JPN");
2019-03-02 04:50:43 +00:00
pairing.Grouping.Value = Ladder.Groupings.FirstOrDefault(g => g.Name.Value == "Finals");
2018-11-06 11:13:04 +00:00
currentMatch.Value = pairing;
2018-11-06 11:18:11 +00:00
Add(new TeamIntroScreen
{
FillMode = FillMode.Fit,
FillAspectRatio = 16 / 9f
});
}
}
}