mirror of
https://github.com/ppy/osu.git
synced 2026-05-23 06:23:47 +08:00
Add test case, rename component
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Screens.Edit.Screens.Setup.Components;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCaseEditorSetupCircularButton : OsuTestCase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(SetupCircularButton)
|
||||
};
|
||||
|
||||
private readonly SetupCircularButton circularButton;
|
||||
|
||||
public TestCaseEditorSetupCircularButton()
|
||||
{
|
||||
Child = circularButton = new SetupCircularButton
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
LabelText = "Button",
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour osuColour)
|
||||
{
|
||||
circularButton.DefaultColour = osuColour.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -14,7 +14,7 @@ using System;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Screens.Setup.Components
|
||||
{
|
||||
public class OsuSetupCircularButton : Container, IHasAccentColour
|
||||
public class SetupCircularButton : Container, IHasAccentColour
|
||||
{
|
||||
private readonly Box fill;
|
||||
private readonly OsuSpriteText label;
|
||||
@@ -69,7 +69,7 @@ namespace osu.Game.Screens.Edit.Screens.Setup.Components
|
||||
}
|
||||
}
|
||||
|
||||
public OsuSetupCircularButton()
|
||||
public SetupCircularButton()
|
||||
{
|
||||
Size = new Vector2(SIZE_X, SIZE_Y);
|
||||
CornerRadius = 15;
|
||||
Reference in New Issue
Block a user