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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-02-14 16:20:38 +08:00
|
|
|
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
|
|
|
{
|
2022-07-29 14:27:39 +08:00
|
|
|
public override void SetUpSteps()
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2022-07-29 14:27:39 +08:00
|
|
|
base.SetUpSteps();
|
2021-06-25 12:02:19 +08:00
|
|
|
|
2022-07-29 14:27:39 +08:00
|
|
|
AddStep("create area", () =>
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2022-07-29 14:27:39 +08:00
|
|
|
SelectedRoom.Value = new Room();
|
|
|
|
|
|
|
|
Child = new MatchBeatmapDetailArea
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Size = new Vector2(500),
|
|
|
|
CreateNewItem = createNewItem
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
2020-02-14 16:20:38 +08:00
|
|
|
|
|
|
|
private void createNewItem()
|
|
|
|
{
|
2022-02-15 22:33:26 +08:00
|
|
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem(new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo)
|
2020-02-14 16:20:38 +08:00
|
|
|
{
|
2021-06-25 12:02:19 +08:00
|
|
|
ID = SelectedRoom.Value.Playlist.Count,
|
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
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|