A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osu.Framework.Allocation;
5using osu.Framework.Graphics;
6using osu.Framework.Graphics.Visualisation;
7using osu.Framework.Input;
8using osu.Framework.Tests.Visual.Containers;
9using osuTK;
10
11namespace osu.Framework.Tests.Visual.Testing
12{
13 public class TestSceneDrawVisualiser : FrameworkTestScene
14 {
15 [BackgroundDependencyLoader]
16 private void load()
17 {
18 DrawVisualiser vis;
19 Drawable target;
20
21 // Avoid stack-overflow scenarios by isolating the hovered drawables through a new input manager
22 Child = new PassThroughInputManager
23 {
24 Children = new[]
25 {
26 target = new TestSceneDynamicDepth
27 {
28 Anchor = Anchor.BottomRight,
29 Origin = Anchor.BottomRight,
30 Size = new Vector2(0.5f)
31 },
32 vis = new DrawVisualiser(),
33 }
34 };
35
36 vis.Show();
37 vis.Target = target;
38 }
39 }
40}