mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Merge branch 'generic-labelledcomponent' into labelled-textbox-improvements
This commit is contained in:
@ -11,7 +11,8 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
|
||||
{
|
||||
public abstract class LabelledComponent : CompositeDrawable
|
||||
public abstract class LabelledComponent<T> : CompositeDrawable
|
||||
where T : Drawable
|
||||
{
|
||||
protected const float CONTENT_PADDING_VERTICAL = 10;
|
||||
protected const float CONTENT_PADDING_HORIZONTAL = 15;
|
||||
@ -20,15 +21,15 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
|
||||
/// <summary>
|
||||
/// The component that is being displayed.
|
||||
/// </summary>
|
||||
protected readonly Drawable Component;
|
||||
protected readonly T Component;
|
||||
|
||||
private readonly OsuTextFlowContainer labelText;
|
||||
private readonly OsuTextFlowContainer descriptionText;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="LabelledComponent"/>.
|
||||
/// Creates a new <see cref="LabelledComponent{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="padded">Whether the component should be padded or should be expanded to the bounds of this <see cref="LabelledComponent"/>.</param>
|
||||
/// <param name="padded">Whether the component should be padded or should be expanded to the bounds of this <see cref="LabelledComponent{T}"/>.</param>
|
||||
protected LabelledComponent(bool padded)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
@ -127,6 +128,6 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
|
||||
/// Creates the component that should be displayed.
|
||||
/// </summary>
|
||||
/// <returns>The component.</returns>
|
||||
protected abstract Drawable CreateComponent();
|
||||
protected abstract T CreateComponent();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user