simplify some stuff

This commit is contained in:
mcendu 2020-01-16 17:58:47 +08:00
parent 4c18a67268
commit e096688ac8
No known key found for this signature in database
GPG Key ID: FBCD5D45163D6364
2 changed files with 3 additions and 8 deletions

View File

@ -10,20 +10,16 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
public class TestSceneModButton : OsuTestScene public class TestSceneModButton : OsuTestScene
{ {
private ModButton modButton;
public TestSceneModButton() public TestSceneModButton()
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
modButton = new ModButton(new MultiMod(new TestMod1(), new TestMod2(), new TestMod3(), new TestMod4())) new ModButton(new MultiMod(new TestMod1(), new TestMod2(), new TestMod3(), new TestMod4()))
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre Origin = Anchor.Centre
} }
}; };
AddStep("left click", () => modButton.SelectNext(1));
} }
private class TestMod1 : TestMod private class TestMod1 : TestMod

View File

@ -68,8 +68,7 @@ namespace osu.Game.Rulesets.UI
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Colour = OsuColour.Gray(84), Colour = OsuColour.Gray(84),
Alpha = 0, Alpha = 0,
Font = OsuFont.Numeric.With(null, 22f),
Font = OsuFont.Numeric.With(null, size - 57.5f),
UseFullGlyphHeight = false, UseFullGlyphHeight = false,
Text = mod.Acronym Text = mod.Acronym
}, },
@ -78,7 +77,7 @@ namespace osu.Game.Rulesets.UI
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Colour = OsuColour.Gray(84), Colour = OsuColour.Gray(84),
Size = new Vector2(size - 35), Size = new Vector2(45),
Icon = FontAwesome.Solid.Question Icon = FontAwesome.Solid.Question
}, },
}; };