1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 07:53:38 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneModButton.cs

63 lines
1.7 KiB
C#
Raw Normal View History

2020-01-15 17:36:27 +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.Graphics.Sprites;
using osu.Game.Overlays.Mods;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestSceneModButton : OsuTestScene
{
2020-01-15 18:24:43 +08:00
public TestSceneModButton()
2020-01-15 17:36:27 +08:00
{
Children = new Drawable[]
{
2020-01-16 17:58:47 +08:00
new ModButton(new MultiMod(new TestMod1(), new TestMod2(), new TestMod3(), new TestMod4()))
2020-01-15 17:36:27 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
}
};
2020-01-15 18:24:43 +08:00
}
2020-01-15 17:36:27 +08:00
private class TestMod1 : TestMod
{
public override string Name => "Test mod 1";
public override string Acronym => "M1";
}
2020-01-15 18:00:14 +08:00
2020-01-15 17:36:27 +08:00
private class TestMod2 : TestMod
{
public override string Name => "Test mod 2";
public override string Acronym => "M2";
public override IconUsage? Icon => FontAwesome.Solid.Exclamation;
}
2020-01-15 18:00:14 +08:00
2020-01-15 17:36:27 +08:00
private class TestMod3 : TestMod
{
public override string Name => "Test mod 3";
public override string Acronym => "M3";
public override IconUsage? Icon => FontAwesome.Solid.ArrowRight;
}
private class TestMod4 : TestMod
{
public override string Name => "Test mod 4";
public override string Acronym => "M4";
}
private abstract class TestMod : Mod, IApplicableMod
{
public override double ScoreMultiplier => 1.0;
}
}
2020-01-15 18:00:14 +08:00
}