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