Merge branch 'master' into beatmap_parsing

This commit is contained in:
Dean Herbert
2017-03-14 17:50:00 +09:00
committed by GitHub
9 changed files with 106 additions and 53 deletions

View File

@ -23,6 +23,14 @@ namespace osu.Game.Modes.UI
internal readonly PlayerInputManager InputManager = new PlayerInputManager();
protected readonly KeyConversionInputManager KeyConversionInputManager;
protected HitRenderer()
{
KeyConversionInputManager = CreateKeyConversionInputManager();
KeyConversionInputManager.RelativeSizeAxes = Axes.Both;
}
/// <summary>
/// Whether all the HitObjects have been judged.
/// </summary>
@ -35,6 +43,8 @@ namespace osu.Game.Modes.UI
if (AllObjectsJudged)
OnAllJudged?.Invoke();
}
protected virtual KeyConversionInputManager CreateKeyConversionInputManager() => new KeyConversionInputManager();
}
public abstract class HitRenderer<TObject> : HitRenderer
@ -42,8 +52,6 @@ namespace osu.Game.Modes.UI
{
public Beatmap<TObject> Beatmap;
public IEnumerable<DrawableHitObject> DrawableObjects => Playfield.HitObjects.Children;
protected override Container<Drawable> Content => content;
protected override bool AllObjectsJudged => Playfield.HitObjects.Children.All(h => h.Judgement.Result.HasValue);
@ -64,13 +72,12 @@ namespace osu.Game.Modes.UI
RelativeSizeAxes = Axes.Both;
KeyConversionInputManager.Add(Playfield = CreatePlayfield());
InputManager.Add(content = new Container
{
RelativeSizeAxes = Axes.Both,
Children = new[]
{
Playfield = CreatePlayfield(),
}
Children = new[] { KeyConversionInputManager }
});
AddInternal(InputManager);