2019-03-05 16:14:30 +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 System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Overlays.Direct;
|
|
|
|
using osu.Game.Rulesets.Osu;
|
|
|
|
using osuTK;
|
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
namespace osu.Game.Tests.Visual.Online
|
2019-03-05 16:14:30 +08:00
|
|
|
{
|
2019-05-15 03:37:25 +08:00
|
|
|
public class TestSceneDirectPanel : OsuTestScene
|
2019-03-05 16:14:30 +08:00
|
|
|
{
|
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
{
|
|
|
|
typeof(DirectGridPanel),
|
|
|
|
typeof(DirectListPanel),
|
|
|
|
typeof(IconPill)
|
|
|
|
};
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
2019-05-31 13:40:53 +08:00
|
|
|
var beatmap = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
2019-03-05 16:14:30 +08:00
|
|
|
beatmap.BeatmapSetInfo.OnlineInfo.HasVideo = true;
|
|
|
|
beatmap.BeatmapSetInfo.OnlineInfo.HasStoryboard = true;
|
|
|
|
|
|
|
|
Child = new FillFlowContainer
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
Padding = new MarginPadding(20),
|
|
|
|
Spacing = new Vector2(0, 20),
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
|
|
|
new DirectGridPanel(beatmap.BeatmapSetInfo),
|
|
|
|
new DirectListPanel(beatmap.BeatmapSetInfo)
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|