2019-01-24 16:43:03 +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.
|
2018-10-25 17:48:11 +08:00
|
|
|
|
2022-05-13 20:39:54 +08:00
|
|
|
using osu.Framework.Allocation;
|
2018-10-25 17:48:11 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Timing;
|
|
|
|
using osu.Game.Rulesets.Edit;
|
2021-05-13 18:53:32 +08:00
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2022-05-13 20:39:54 +08:00
|
|
|
using osu.Game.Screens.Edit;
|
2018-10-25 17:48:11 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public abstract partial class SelectionBlueprintTestScene : OsuManualInputManagerTestScene
|
2018-10-25 17:48:11 +08:00
|
|
|
{
|
2022-05-13 20:39:54 +08:00
|
|
|
[Cached]
|
|
|
|
private readonly EditorClock editorClock = new EditorClock();
|
|
|
|
|
2022-08-17 14:40:01 +08:00
|
|
|
protected override Container<Drawable> Content => content;
|
2018-10-25 17:48:11 +08:00
|
|
|
private readonly Container content;
|
|
|
|
|
2019-05-15 03:37:25 +08:00
|
|
|
protected SelectionBlueprintTestScene()
|
2018-10-25 17:48:11 +08:00
|
|
|
{
|
2022-08-17 14:40:01 +08:00
|
|
|
base.Content.AddRange(new Drawable[]
|
2018-10-25 17:48:11 +08:00
|
|
|
{
|
2022-08-17 14:40:01 +08:00
|
|
|
editorClock,
|
|
|
|
content = new Container
|
|
|
|
{
|
|
|
|
Clock = new FramedClock(new StopwatchClock()),
|
|
|
|
RelativeSizeAxes = Axes.Both
|
|
|
|
}
|
2018-10-25 17:48:11 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-08-17 14:40:01 +08:00
|
|
|
protected void AddBlueprint(HitObjectSelectionBlueprint blueprint, DrawableHitObject? drawableObject = null)
|
2018-10-25 17:48:11 +08:00
|
|
|
{
|
2019-10-01 18:32:47 +08:00
|
|
|
Add(blueprint.With(d =>
|
|
|
|
{
|
2021-05-18 13:26:26 +08:00
|
|
|
d.DrawableObject = drawableObject;
|
2019-10-01 18:32:47 +08:00
|
|
|
d.Depth = float.MinValue;
|
|
|
|
d.Select();
|
|
|
|
}));
|
2018-10-25 17:48:11 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|