mirror of
https://github.com/ppy/osu
synced 2024-12-12 18:07:52 +00:00
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
// 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 JetBrains.Annotations;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Timing;
|
|
using osu.Game.Rulesets.Edit;
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
{
|
|
public abstract class SelectionBlueprintTestScene : OsuManualInputManagerTestScene
|
|
{
|
|
protected override Container<Drawable> Content => content ?? base.Content;
|
|
private readonly Container content;
|
|
|
|
protected SelectionBlueprintTestScene()
|
|
{
|
|
base.Content.Add(content = new Container
|
|
{
|
|
Clock = new FramedClock(new StopwatchClock()),
|
|
RelativeSizeAxes = Axes.Both
|
|
});
|
|
}
|
|
|
|
protected void AddBlueprint(HitObjectSelectionBlueprint blueprint, [CanBeNull] DrawableHitObject drawableObject = null)
|
|
{
|
|
Add(blueprint.With(d =>
|
|
{
|
|
d.DrawableObject = drawableObject;
|
|
d.Depth = float.MinValue;
|
|
d.Select();
|
|
}));
|
|
}
|
|
}
|
|
}
|