mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 16:03:01 +08:00
Add test case, rename component
This commit is contained in:
parent
7b4616c6c1
commit
4d0d4523ca
38
osu.Game.Tests/Visual/TestCaseEditorSetupCircularButton.cs
Normal file
38
osu.Game.Tests/Visual/TestCaseEditorSetupCircularButton.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,7 @@ using System;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Screens.Setup.Components
|
namespace osu.Game.Screens.Edit.Screens.Setup.Components
|
||||||
{
|
{
|
||||||
public class OsuSetupCircularButton : Container, IHasAccentColour
|
public class SetupCircularButton : Container, IHasAccentColour
|
||||||
{
|
{
|
||||||
private readonly Box fill;
|
private readonly Box fill;
|
||||||
private readonly OsuSpriteText label;
|
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);
|
Size = new Vector2(SIZE_X, SIZE_Y);
|
||||||
CornerRadius = 15;
|
CornerRadius = 15;
|
Loading…
Reference in New Issue
Block a user