From cc0520d7223387ceaf8b48ebec8a0f0879ed1244 Mon Sep 17 00:00:00 2001 From: "ANDY840119-PC\\andy840119" Date: Wed, 10 Jan 2018 23:47:38 +0900 Subject: [PATCH] 1. because set stage's width doesn't help, so use margin instead 2. adjust spacing when has different number of stages --- osu.Game.Rulesets.Mania/UI/ManiaColumnStage.cs | 6 ++++++ osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/UI/ManiaColumnStage.cs b/osu.Game.Rulesets.Mania/UI/ManiaColumnStage.cs index dad5082175..46dd44864a 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaColumnStage.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaColumnStage.cs @@ -155,6 +155,12 @@ public void AddColumn(Column c) c.VisibleTimeRange.BindTo(VisibleTimeRange); topLevelContainer.Add(c.TopLevelContainer.CreateProxy()); columns.Add(c); + + Margin = new MarginPadding() + { + Left = columns.Count * HIT_TARGET_POSITION / 2, + Right = columns.Count * HIT_TARGET_POSITION / 2, + }; } public void AddJudgement(Judgement judgement) diff --git a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs index 292b301e29..06d0c5c242 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs @@ -54,15 +54,18 @@ public ManiaPlayfield(List stages) Inverted.Value = true; + var stageSpacing = 300 / stages.Count(); + InternalChildren = new Drawable[] { listColumnStages = new FillFlowContainer { + Name="Stages", Direction = FillDirection.Horizontal, RelativeSizeAxes = Axes.Y, Anchor = Anchor.Centre, Origin = Anchor.Centre, - Spacing = new Vector2(400), + Spacing = new Vector2(stageSpacing), } };