mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix TestCasePlayerLoader not having a background stack
This commit is contained in:
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Screens;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
@ -15,13 +16,20 @@ namespace osu.Game.Tests.Visual
|
||||
private PlayerLoader loader;
|
||||
private ScreenStack stack;
|
||||
|
||||
[Cached]
|
||||
private BackgroundScreenStack backgroundStack;
|
||||
|
||||
public TestCasePlayerLoader()
|
||||
{
|
||||
InputManager.Add(backgroundStack = new BackgroundScreenStack {RelativeSizeAxes = Axes.Both});
|
||||
InputManager.Add(stack = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGameBase game)
|
||||
{
|
||||
Beatmap.Value = new DummyWorkingBeatmap(game);
|
||||
|
||||
InputManager.Add(stack = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
||||
|
||||
AddStep("load dummy beatmap", () => stack.Push(loader = new PlayerLoader(() => new Player
|
||||
{
|
||||
AllowPause = false,
|
||||
|
Reference in New Issue
Block a user