1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 21:12:55 +08:00
osu-lazer/osu.Game.Tests/Visual/Editing/TestSceneBlueprintSelectBox.cs
2020-09-29 20:08:56 +09:00

40 lines
1.3 KiB
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 osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Screens.Edit.Compose.Components;
using osuTK;
namespace osu.Game.Tests.Visual.Editing
{
public class TestSceneComposeSelectBox : OsuTestScene
{
public TestSceneComposeSelectBox()
{
ComposeSelectionBox selectionBox = null;
AddStep("create box", () =>
Child = new Container
{
Size = new Vector2(300),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{
selectionBox = new ComposeSelectionBox
{
CanRotate = true,
CanScaleX = true,
CanScaleY = true
}
}
});
AddToggleStep("toggle rotation", state => selectionBox.CanRotate = state);
AddToggleStep("toggle x", state => selectionBox.CanScaleX = state);
AddToggleStep("toggle y", state => selectionBox.CanScaleY = state);
}
}
}