1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 07:32:55 +08:00
osu-lazer/osu.Game.Tests/Visual/Online/TestSceneGamemodeControl.cs

41 lines
1.4 KiB
C#
Raw Normal View History

2019-06-04 23:37:41 +08:00
// 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.Graphics;
using osu.Framework.MathUtils;
using osu.Game.Overlays.Profile.Header.Components;
using osuTK.Graphics;
using System;
using System.Collections.Generic;
namespace osu.Game.Tests.Visual.Online
{
public class TestSceneGamemodeControl : OsuTestScene
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(GamemodeControl),
typeof(GamemodeTabItem),
};
public TestSceneGamemodeControl()
{
2019-06-05 00:45:46 +08:00
GamemodeControl control;
2019-06-04 23:37:41 +08:00
Child = control = new GamemodeControl
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
};
AddStep("set osu! as default", () => control.SetDefaultGamemode("osu"));
AddStep("set mania as default", () => control.SetDefaultGamemode("mania"));
AddStep("set taiko as default", () => control.SetDefaultGamemode("taiko"));
AddStep("set catch as default", () => control.SetDefaultGamemode("fruits"));
2019-06-05 00:45:46 +08:00
AddStep("select default gamemode", control.SelectDefaultGamemode);
2019-06-04 23:37:41 +08:00
AddStep("set random colour", () => control.AccentColour = new Color4(RNG.NextSingle(), RNG.NextSingle(), RNG.NextSingle(), 1));
}
}
}