mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
de73ac7cec
This is kind of how I see things working going forward, where the editor can be applied to anything in the game which supports it (ie. a results screen, gameplay screen, etc.) and it will immediately allow changing the interface. This adds a test scene which shows this working with gameplay.
37 lines
1001 B
C#
37 lines
1001 B
C#
// 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.Testing;
|
|
using osu.Game.Rulesets;
|
|
using osu.Game.Rulesets.Osu;
|
|
using osu.Game.Skinning.Editor;
|
|
|
|
namespace osu.Game.Tests.Visual.Gameplay
|
|
{
|
|
public class TestSceneSkinEditor : PlayerTestScene
|
|
{
|
|
private SkinEditor skinEditor;
|
|
|
|
[SetUpSteps]
|
|
public override void SetUpSteps()
|
|
{
|
|
base.SetUpSteps();
|
|
|
|
AddStep("add editor overlay", () =>
|
|
{
|
|
skinEditor?.Expire();
|
|
LoadComponentAsync(skinEditor = new SkinEditor(Player), Add);
|
|
});
|
|
}
|
|
|
|
[Test]
|
|
public void TestToggleEditor()
|
|
{
|
|
AddToggleStep("toggle editor visibility", visible => skinEditor.ToggleVisibility());
|
|
}
|
|
|
|
protected override Ruleset CreatePlayerRuleset() => new OsuRuleset();
|
|
}
|
|
}
|