1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00
osu-lazer/osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs

46 lines
1.3 KiB
C#
Raw Normal View History

2021-04-27 17:03:49 +08: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;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
2021-04-27 17:03:49 +08:00
using osu.Framework.Testing;
using osu.Game.Overlays;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Skinning.Editor;
2021-04-27 17:03:49 +08:00
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestSceneSkinEditor : PlayerTestScene
2021-04-27 17:03:49 +08:00
{
private SkinEditor skinEditor;
2021-05-13 13:54:52 +08:00
protected override bool Autoplay => true;
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
2021-04-27 17:03:49 +08:00
[SetUpSteps]
public override void SetUpSteps()
2021-04-27 17:03:49 +08:00
{
base.SetUpSteps();
2021-04-27 17:03:49 +08:00
AddStep("reload skin editor", () =>
{
skinEditor?.Expire();
2022-03-11 22:30:46 +08:00
Player.ScaleTo(0.8f);
LoadComponentAsync(skinEditor = new SkinEditor(Player), Add);
2021-04-27 17:03:49 +08:00
});
}
[Test]
public void TestToggleEditor()
{
AddToggleStep("toggle editor visibility", visible => skinEditor.ToggleVisibility());
}
protected override Ruleset CreatePlayerRuleset() => new OsuRuleset();
2021-04-27 17:03:49 +08:00
}
}