Add test case, rename component

This commit is contained in:
AlFasGD 2018-07-24 11:23:38 +03:00
parent 7b4616c6c1
commit 4d0d4523ca
2 changed files with 40 additions and 2 deletions

View File

@ -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;
}
}
}

View File

@ -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;