Move InputManager implementation to base skinnable test scene class

This commit is contained in:
Dean Herbert 2020-07-31 10:43:54 +09:00
parent 86784e30ad
commit fb74195d83
3 changed files with 15 additions and 16 deletions

View File

@ -1,12 +1,27 @@
// 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 osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Osu.Tests
{
public abstract class OsuSkinnableTestScene : SkinnableTestScene
{
private Container content;
protected override Container<Drawable> Content
{
get
{
if (content == null)
base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 }));
return content;
}
}
protected override Ruleset CreateRulesetForSkinProvider() => new OsuRuleset();
}
}

View File

@ -3,7 +3,6 @@
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
@ -26,19 +25,6 @@ namespace osu.Game.Rulesets.Osu.Tests
[TestFixture]
public class TestSceneSlider : OsuSkinnableTestScene
{
private Container content;
protected override Container<Drawable> Content
{
get
{
if (content == null)
base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 }));
return content;
}
}
private int depthIndex;
public TestSceneSlider()

View File

@ -19,8 +19,6 @@ public class TestSceneSpinner : OsuSkinnableTestScene
public TestSceneSpinner()
{
// base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 }));
AddStep("Miss Big", () => SetContents(() => testSingle(2)));
AddStep("Miss Medium", () => SetContents(() => testSingle(5)));
AddStep("Miss Small", () => SetContents(() => testSingle(7)));