From b90207fa5457b452bafa57f404391277f0d601d0 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 31 Jan 2019 14:55:48 +0900 Subject: [PATCH] Give ScreenTestCase a background stack --- osu.Game/Tests/Visual/ScreenTestCase.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/osu.Game/Tests/Visual/ScreenTestCase.cs b/osu.Game/Tests/Visual/ScreenTestCase.cs index e635a9837d..79c57ad9f4 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.Framework.Screens; using osu.Game.Screens; @@ -14,12 +15,16 @@ namespace osu.Game.Tests.Visual { private readonly ScreenStack stack; + [Cached] + private BackgroundScreenStack backgroundStack; + protected ScreenTestCase() { - Add(stack = new ScreenStack + Children = new Drawable[] { - RelativeSizeAxes = Axes.Both, - }); + backgroundStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both }, + stack = new ScreenStack { RelativeSizeAxes = Axes.Both } + }; } protected void LoadScreen(OsuScreen screen)