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

@ -4,21 +4,19 @@
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using System;
using osu.Framework.Allocation;
using osu.Framework.Timing;
namespace osu.Game.Screens.Edit.Components
{
public class TimeInfoContainer : BottomBarContainer
{
private const int count_duration = 150;
private readonly OsuSpriteText trackTimer;
private readonly IAdjustableClock adjustableClock;
private IAdjustableClock adjustableClock;
public TimeInfoContainer(IAdjustableClock adjustableClock)
public TimeInfoContainer()
{
this.adjustableClock = adjustableClock;
Children = new Drawable[]
{
@ -33,6 +31,12 @@ namespace osu.Game.Screens.Edit.Components
};
}
[BackgroundDependencyLoader]
private void load(IAdjustableClock adjustableClock)
{
this.adjustableClock = adjustableClock;
}
protected override void Update()
{
base.Update();