Remove duplicate implementation of the Osu playfield layer

This commit is contained in:
smoogipoo
2018-09-21 14:43:17 +09:00
parent 368ceec47c
commit a166d03ede
4 changed files with 67 additions and 70 deletions

View File

@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Edit
new HitObjectCompositionTool<Spinner>()
};
protected override Container CreateLayerContainer() => new LayerContainer();
protected override Container CreateLayerContainer() => new PlayfieldLayer { RelativeSizeAxes = Axes.Both };
public override HitObjectMask CreateMaskFor(DrawableHitObject hitObject)
{
@ -46,20 +46,5 @@ namespace osu.Game.Rulesets.Osu.Edit
return base.CreateMaskFor(hitObject);
}
private class LayerContainer : Container
{
protected override Container<Drawable> Content => content;
private readonly Container content;
public LayerContainer()
{
RelativeSizeAxes = Axes.Both;
FillMode = FillMode.Fit;
FillAspectRatio = 4f / 3;
Child = content = new ScalingContainer(OsuPlayfield.BASE_SIZE.X) { RelativeSizeAxes = Axes.Both };
}
}
}
}