1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Update with generic labelledcomponent

This commit is contained in:
smoogipoo 2019-09-24 18:25:17 +09:00
parent 5212c50654
commit 6b702eb6de
2 changed files with 4 additions and 5 deletions

View File

@ -7,6 +7,7 @@ using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Edit.Setup.Components.LabelledComponents;
namespace osu.Game.Tests.Visual.UserInterface
@ -27,7 +28,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{
AddStep("create component", () =>
{
LabelledComponent component;
LabelledComponent<OsuTextBox> component;
Child = new Container
{

View File

@ -9,12 +9,10 @@ using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
{
public class LabelledTextBox : LabelledComponent
public class LabelledTextBox : LabelledComponent<OsuTextBox>
{
public event TextBox.OnCommitHandler OnCommit;
protected new OsuTextBox Component => (OsuTextBox)base.Component;
public LabelledTextBox()
: base(false)
{
@ -41,7 +39,7 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
Component.BorderColour = colours.Blue;
}
protected override Drawable CreateComponent() => new OsuTextBox
protected override OsuTextBox CreateComponent() => new OsuTextBox
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,