1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-15 10:32:50 +08:00
Files
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneFPSCounter.cs
T
2025-04-23 08:55:29 +02:00

58 lines
1.8 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 NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Testing;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual.UserInterface
{
public partial class TestSceneFPSCounter : OsuTestScene
{
[Resolved]
private OsuConfigManager config { get; set; } = null!;
[SetUpSteps]
public void SetUpSteps()
{
AddStep("create display", () =>
{
Children = new Drawable[]
{
new Box
{
Colour = Color4.White,
RelativeSizeAxes = Axes.Both,
},
new FillFlowContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new FPSCounter(),
new FPSCounter { Scale = new Vector2(2) },
new FPSCounter { Scale = new Vector2(4) },
}
},
};
});
AddToggleStep("toggle show", b => config.SetValue(OsuSetting.ShowFpsDisplay, b));
}
[Test]
public void TestBasic()
{
}
}
}