osu/osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs

37 lines
1001 B
C#
Raw Normal View History

2021-04-27 09:03:49 +00:00
// 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 NUnit.Framework;
2021-04-27 09:03:49 +00:00
using osu.Framework.Testing;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Skinning.Editor;
2021-04-27 09:03:49 +00:00
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestSceneSkinEditor : PlayerTestScene
2021-04-27 09:03:49 +00:00
{
private SkinEditor skinEditor;
2021-04-27 09:03:49 +00:00
[SetUpSteps]
public override void SetUpSteps()
2021-04-27 09:03:49 +00:00
{
base.SetUpSteps();
2021-04-27 09:03:49 +00:00
AddStep("add editor overlay", () =>
{
skinEditor?.Expire();
LoadComponentAsync(skinEditor = new SkinEditor(Player), Add);
2021-04-27 09:03:49 +00:00
});
}
[Test]
public void TestToggleEditor()
{
AddToggleStep("toggle editor visibility", visible => skinEditor.ToggleVisibility());
}
protected override Ruleset CreatePlayerRuleset() => new OsuRuleset();
2021-04-27 09:03:49 +00:00
}
}