Fix various test scenes not adding EditorClock to the draw hierarchy

This commit is contained in:
Dean Herbert
2022-08-17 15:40:01 +09:00
parent 12d6d6793c
commit 4b72e55770
14 changed files with 174 additions and 165 deletions

View File

@ -1,9 +1,6 @@
// 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.
#nullable disable
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -19,19 +16,23 @@ namespace osu.Game.Tests.Visual
[Cached]
private readonly EditorClock editorClock = new EditorClock();
protected override Container<Drawable> Content => content ?? base.Content;
protected override Container<Drawable> Content => content;
private readonly Container content;
protected SelectionBlueprintTestScene()
{
base.Content.Add(content = new Container
base.Content.AddRange(new Drawable[]
{
Clock = new FramedClock(new StopwatchClock()),
RelativeSizeAxes = Axes.Both
editorClock,
content = new Container
{
Clock = new FramedClock(new StopwatchClock()),
RelativeSizeAxes = Axes.Both
}
});
}
protected void AddBlueprint(HitObjectSelectionBlueprint blueprint, [CanBeNull] DrawableHitObject drawableObject = null)
protected void AddBlueprint(HitObjectSelectionBlueprint blueprint, DrawableHitObject? drawableObject = null)
{
Add(blueprint.With(d =>
{