mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Allow timeline content to get more localised dependencies
This commit is contained in:
parent
24a466ab24
commit
79351976d5
@ -20,7 +20,7 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private readonly BindableBeatDivisor beatDivisor = new BindableBeatDivisor();
|
||||
|
||||
private TimelineArea timelineArea;
|
||||
private Container timelineContainer;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
||||
@ -62,11 +62,10 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
new Container
|
||||
timelineContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Right = 5 },
|
||||
Child = timelineArea = CreateTimelineArea()
|
||||
},
|
||||
new BeatDivisorControl(beatDivisor) { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
@ -100,14 +99,16 @@ namespace osu.Game.Screens.Edit
|
||||
mainContent.Add(content);
|
||||
content.FadeInFromZero(300, Easing.OutQuint);
|
||||
|
||||
LoadComponentAsync(CreateTimelineContent(), timelineArea.Add);
|
||||
LoadComponentAsync(new TimelineArea
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = CreateTimelineContent()
|
||||
}, timelineContainer.Add);
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract Drawable CreateMainContent();
|
||||
|
||||
protected virtual Drawable CreateTimelineContent() => new Container();
|
||||
|
||||
protected TimelineArea CreateTimelineArea() => new TimelineArea { RelativeSizeAxes = Axes.Both };
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user