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.Cursor;
7using osu.Framework.Graphics.Containers;
8using osu.Framework.Platform;
9using osu.Framework.Testing;
10
11namespace osu.Framework.Tests
12{
13 internal class VisualTestGame : TestGame
14 {
15 [BackgroundDependencyLoader]
16 private void load()
17 {
18 Child = new SafeAreaContainer
19 {
20 RelativeSizeAxes = Axes.Both,
21 Child = new DrawSizePreservingFillContainer
22 {
23 Children = new Drawable[]
24 {
25 new TestBrowser(),
26 new CursorContainer(),
27 },
28 }
29 };
30 }
31
32 public override void SetHost(GameHost host)
33 {
34 base.SetHost(host);
35 host.Window.CursorState |= CursorState.Hidden;
36 }
37 }
38}