1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Tidy up constructor field initialisation

This commit is contained in:
Dean Herbert 2022-08-26 16:00:20 +09:00
parent 23efec6505
commit a40355186a

View File

@ -14,8 +14,7 @@ namespace osu.Game.Graphics.Containers
/// </summary>
public class UprightAspectMaintainingContainer : Container
{
protected override Container<Drawable> Content => content;
private readonly Container content;
protected override Container<Drawable> Content { get; }
/// <summary>
/// Controls how much this container scales compared to its parent (default is 1.0f).
@ -27,14 +26,14 @@ namespace osu.Game.Graphics.Containers
/// </summary>
public ScaleMode Scaling { get; set; } = ScaleMode.Vertical;
private readonly LayoutValue layout = new LayoutValue(Invalidation.DrawInfo, InvalidationSource.Parent);
public UprightAspectMaintainingContainer()
{
InternalChild = content = new GrowToFitContainer();
AddInternal(Content = new GrowToFitContainer());
AddLayout(layout);
}
private readonly LayoutValue layout = new LayoutValue(Invalidation.DrawInfo, InvalidationSource.Parent);
protected override void Update()
{
base.Update();