mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Simplify content creation of Timeline / TimelineArea
This commit is contained in:
@ -12,11 +12,19 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
{
|
||||
public class TimelineArea : Container
|
||||
public class TimelineArea : CompositeDrawable
|
||||
{
|
||||
public readonly Timeline Timeline = new Timeline();
|
||||
public Timeline Timeline;
|
||||
|
||||
protected override Container<Drawable> Content => Timeline;
|
||||
private readonly Drawable userContent;
|
||||
|
||||
public TimelineArea(Drawable content = null)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
userContent = content ?? Drawable.Empty();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
@ -122,7 +130,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
}
|
||||
}
|
||||
},
|
||||
Timeline
|
||||
Timeline = new Timeline(userContent),
|
||||
},
|
||||
},
|
||||
RowDimensions = new[]
|
||||
|
Reference in New Issue
Block a user