1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 05:32:57 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneOsuLogo.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.4 KiB
C#
Raw Normal View History

// 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.Graphics;
using osu.Game.Screens.Menu;
using osu.Game.Seasonal;
2024-12-19 17:44:44 +08:00
using osuTK;
namespace osu.Game.Tests.Visual.UserInterface
{
public partial class TestSceneOsuLogo : OsuTestScene
{
2024-12-19 17:44:44 +08:00
private OsuLogo? logo;
private float scale = 1;
protected override void LoadComplete()
{
base.LoadComplete();
AddSliderStep("scale", 0.1, 2, 1, scale =>
{
if (logo != null)
Child.Scale = new Vector2(this.scale = (float)scale);
});
}
[Test]
public void TestBasic()
{
AddStep("Add logo", () =>
{
2024-12-19 17:44:44 +08:00
Child = logo = new OsuLogo
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(scale),
};
});
}
2024-12-19 17:44:44 +08:00
[Test]
public void TestChristmas()
{
AddStep("Add logo", () =>
2024-12-19 17:44:44 +08:00
{
Child = logo = new OsuLogoChristmas
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(scale),
};
2024-12-19 17:44:44 +08:00
});
}
}
}