1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-03 22:02:57 +08:00

Give stages a size again

This commit is contained in:
smoogipoo 2018-01-15 19:44:42 +09:00
parent 8a7892b66a
commit 28586317dd
4 changed files with 8 additions and 10 deletions

View File

@ -47,6 +47,7 @@ namespace osu.Game.Rulesets.Mania.UI
public Column()
: base(ScrollingDirection.Up)
{
RelativeSizeAxes = Axes.Y;
Width = column_width;
InternalChildren = new Drawable[]

View File

@ -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),

View File

@ -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

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// 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
/// <param name="customWidth">Whether we want our internal coordinate system to be scaled to a specified width.</param>
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}"); }
}
/// <summary>
/// Performs post-processing tasks (if any) after all DrawableHitObjects are loaded into this Playfield.
/// </summary>