Files
osu-framework/osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs
Dean Herbert 75ed421f60 Automated pass
2023-06-24 00:42:48 +09:00

41 lines
1.2 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Visualisation;
using osu.Framework.Input;
using osu.Framework.Tests.Visual.Containers;
using osuTK;
namespace osu.Framework.Tests.Visual.Testing
{
public partial class TestSceneDrawVisualiser : FrameworkTestScene
{
[BackgroundDependencyLoader]
private void load()
{
DrawVisualiser vis;
Drawable target;
// Avoid stack-overflow scenarios by isolating the hovered drawables through a new input manager
Child = new PassThroughInputManager
{
Children = new[]
{
target = new TestSceneDynamicDepth
{
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Size = new Vector2(0.5f)
},
vis = new DrawVisualiser(),
}
};
vis.Show();
vis.Target = target;
}
}
}