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.Graphics;
|
2022-02-15 15:01:14 +08:00
|
|
|
using osu.Game.Online.API;
|
2020-12-25 12:38:11 +08:00
|
|
|
using osu.Game.Online.Rooms;
|
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
|
|
|
{
|
|
|
|
[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 },
|
2022-02-15 15:01:14 +08:00
|
|
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
|
|
|
RequiredMods = new[]
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2022-02-15 15:01:14 +08:00
|
|
|
new APIMod(new OsuModHardRock()),
|
|
|
|
new APIMod(new OsuModDoubleTime()),
|
|
|
|
new APIMod(new OsuModAutoplay())
|
2020-02-14 16:20:38 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|