Pass down editor clocks through DI

This commit is contained in:
smoogipoo
2018-03-19 16:27:52 +09:00
parent abb5dcf678
commit e25d1f6982
14 changed files with 91 additions and 116 deletions

View File

@ -17,13 +17,12 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
/// </summary>
public class SummaryTimeline : BottomBarContainer
{
private readonly Drawable timelineBar;
public SummaryTimeline(IAdjustableClock adjustableClock)
[BackgroundDependencyLoader]
private void load(OsuColour colours, IAdjustableClock adjustableClock)
{
TimelinePart markerPart, controlPointPart, bookmarkPart, breakPart;
Children = new[]
Children = new Drawable[]
{
markerPart = new MarkerPart(adjustableClock) { RelativeSizeAxes = Axes.Both },
controlPointPart = new ControlPointPart
@ -40,9 +39,10 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
RelativeSizeAxes = Axes.Both,
Height = 0.35f
},
timelineBar = new Container
new Container
{
RelativeSizeAxes = Axes.Both,
Colour = colours.Gray5,
Children = new Drawable[]
{
new Circle
@ -81,11 +81,5 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
bookmarkPart.Beatmap.BindTo(Beatmap);
breakPart.Beatmap.BindTo(Beatmap);
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
timelineBar.Colour = colours.Gray5;
}
}
}