2020-02-14 16:20:38 +08: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.
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Beatmaps;
|
2020-12-25 12:38:11 +08:00
|
|
|
using osu.Game.Online.Rooms;
|
2020-02-14 16:20:38 +08:00
|
|
|
using osu.Game.Rulesets;
|
2020-02-14 16:59:14 +08:00
|
|
|
using osu.Game.Rulesets.Osu;
|
2020-02-14 16:20:38 +08:00
|
|
|
using osu.Game.Rulesets.Osu.Mods;
|
2020-12-25 23:50:00 +08:00
|
|
|
using osu.Game.Screens.OnlinePlay.Components;
|
2020-02-14 16:59:14 +08:00
|
|
|
using osu.Game.Tests.Beatmaps;
|
2021-06-24 15:29:06 +08:00
|
|
|
using osu.Game.Tests.Visual.OnlinePlay;
|
2020-02-14 16:20:38 +08:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Multiplayer
|
|
|
|
{
|
2021-06-25 12:02:19 +08:00
|
|
|
public class TestSceneMatchBeatmapDetailArea : OnlinePlayTestScene
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
|
|
|
[Resolved]
|
|
|
|
private BeatmapManager beatmapManager { get; set; }
|
|
|
|
|
|
|
|
[Resolved]
|
|
|
|
private RulesetStore rulesetStore { get; set; }
|
|
|
|
|
|
|
|
[SetUp]
|
2021-06-25 12:02:19 +08:00
|
|
|
public new void Setup() => Schedule(() =>
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2021-06-25 12:02:19 +08:00
|
|
|
SelectedRoom.Value = new Room();
|
|
|
|
|
|
|
|
Child = new MatchBeatmapDetailArea
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2021-06-25 12:02:19 +08:00
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Size = new Vector2(500),
|
|
|
|
CreateNewItem = createNewItem
|
2020-02-14 16:20:38 +08:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
private void createNewItem()
|
|
|
|
{
|
2021-06-25 12:02:19 +08:00
|
|
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2021-06-25 12:02:19 +08:00
|
|
|
ID = SelectedRoom.Value.Playlist.Count,
|
2020-02-14 16:59:14 +08:00
|
|
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
|
|
|
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
2020-02-14 16:20:38 +08:00
|
|
|
RequiredMods =
|
|
|
|
{
|
|
|
|
new OsuModHardRock(),
|
|
|
|
new OsuModDoubleTime(),
|
|
|
|
new OsuModAutoplay()
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|