From 61b8fb03665b925193801877a73fdfe09c179bc7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 27 Mar 2019 22:28:32 +0900 Subject: [PATCH] Allow ScreenTestCase to support content --- osu.Game/Tests/Visual/ScreenTestCase.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Tests/Visual/ScreenTestCase.cs b/osu.Game/Tests/Visual/ScreenTestCase.cs index eec60d01c5..eb0623bbfc 100644 --- a/osu.Game/Tests/Visual/ScreenTestCase.cs +++ b/osu.Game/Tests/Visual/ScreenTestCase.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Screens; @@ -11,11 +12,12 @@ namespace osu.Game.Tests.Visual /// public abstract class ScreenTestCase : OsuTestCase { - private readonly OsuScreenStack stack; + private OsuScreenStack stack; - protected ScreenTestCase() + [BackgroundDependencyLoader] + private void load() { - Child = stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both }; + Add(stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both }); } protected void LoadScreen(OsuScreen screen)