1. because set stage's width doesn't help, so use margin instead

2. adjust spacing when has different number of stages
This commit is contained in:
ANDY840119-PC\andy840119 2018-01-10 23:47:38 +09:00
parent fb857c5e37
commit cc0520d722
2 changed files with 10 additions and 1 deletions

View File

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

View File

@ -54,15 +54,18 @@ public ManiaPlayfield(List<StageDefinition> stages)
Inverted.Value = true;
var stageSpacing = 300 / stages.Count();
InternalChildren = new Drawable[]
{
listColumnStages = new FillFlowContainer<ManiaColumnStage>
{
Name="Stages",
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.Y,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Spacing = new Vector2(400),
Spacing = new Vector2(stageSpacing),
}
};