osu/osu.Game/Tests/Visual/SelectionBlueprintTestScene.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.4 KiB
C#
Raw Normal View History

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