diff --git a/osu.Game.Rulesets.Mania/UI/Column.cs b/osu.Game.Rulesets.Mania/UI/Column.cs index c2dd86d35d..f2eb2ef326 100644 --- a/osu.Game.Rulesets.Mania/UI/Column.cs +++ b/osu.Game.Rulesets.Mania/UI/Column.cs @@ -47,6 +47,7 @@ namespace osu.Game.Rulesets.Mania.UI public Column() : base(ScrollingDirection.Up) { + RelativeSizeAxes = Axes.Y; Width = column_width; InternalChildren = new Drawable[] diff --git a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs index ed973d6962..9a148b6770 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs @@ -55,6 +55,7 @@ namespace osu.Game.Rulesets.Mania.UI Name = "Stages", Direction = FillDirection.Horizontal, RelativeSizeAxes = Axes.Y, + AutoSizeAxes = Axes.X, Anchor = Anchor.Centre, Origin = Anchor.Centre, Spacing = new Vector2(stageSpacing), diff --git a/osu.Game.Rulesets.Mania/UI/ManiaStage.cs b/osu.Game.Rulesets.Mania/UI/ManiaStage.cs index e0c1658054..2d9e7157da 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaStage.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaStage.cs @@ -60,9 +60,13 @@ namespace osu.Game.Rulesets.Mania.UI this.firstColumnIndex = firstColumnIndex; this.definition = definition; - Name = "Playfield elements"; + Name = "Stage"; + Anchor = Anchor.Centre; Origin = Anchor.Centre; + RelativeSizeAxes = Axes.Y; + AutoSizeAxes = Axes.X; + InternalChildren = new Drawable[] { new Container diff --git a/osu.Game/Rulesets/UI/Playfield.cs b/osu.Game/Rulesets/UI/Playfield.cs index 25a7adb5a7..2e2fb91b12 100644 --- a/osu.Game/Rulesets/UI/Playfield.cs +++ b/osu.Game/Rulesets/UI/Playfield.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Objects.Drawables; @@ -34,8 +33,7 @@ namespace osu.Game.Rulesets.UI /// Whether we want our internal coordinate system to be scaled to a specified width. protected Playfield(float? customWidth = null) { - // Default height since we force relative size axes - Size = Vector2.One; + RelativeSizeAxes = Axes.Both; AddInternal(ScaledContent = new ScaledContainer { @@ -60,12 +58,6 @@ namespace osu.Game.Rulesets.UI Add(HitObjects); } - public override Axes RelativeSizeAxes - { - get { return Axes.Both; } - set { throw new InvalidOperationException($@"{nameof(Playfield)}'s {nameof(RelativeSizeAxes)} should never be changed from {Axes.Both}"); } - } - /// /// Performs post-processing tasks (if any) after all DrawableHitObjects are loaded into this Playfield. ///