mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 05:12:54 +08:00
Fix column potentially added at wrong indices
This commit is contained in:
parent
018523a43a
commit
723e5cafb6
@ -36,7 +36,6 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
private readonly DrawablePool<DrawableManiaJudgement> judgementPool;
|
||||
|
||||
private readonly Drawable barLineContainer;
|
||||
private readonly Container topLevelContainer;
|
||||
|
||||
private readonly Dictionary<ColumnType, Color4> columnColours = new Dictionary<ColumnType, Color4>
|
||||
{
|
||||
@ -60,6 +59,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
AutoSizeAxes = Axes.X;
|
||||
|
||||
Container topLevelContainer;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
judgementPool = new DrawablePool<DrawableManiaJudgement>(2),
|
||||
@ -116,6 +117,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
for (int i = 0; i < definition.Columns; i++)
|
||||
{
|
||||
var columnType = definition.GetTypeOfColumn(i);
|
||||
|
||||
var column = new Column(firstColumnIndex + i)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -125,17 +127,12 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
Action = { Value = columnType == ColumnType.Special ? specialColumnStartAction++ : normalColumnStartAction++ }
|
||||
};
|
||||
|
||||
AddColumn(column);
|
||||
topLevelContainer.Add(column.TopLevelContainer.CreateProxy());
|
||||
columnFlow.SetColumn(i, column);
|
||||
AddNested(column);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddColumn(Column c)
|
||||
{
|
||||
topLevelContainer.Add(c.TopLevelContainer.CreateProxy());
|
||||
columnFlow.SetColumn(c.Index, c);
|
||||
AddNested(c);
|
||||
}
|
||||
|
||||
public override void Add(DrawableHitObject h)
|
||||
{
|
||||
var maniaObject = (ManiaHitObject)h.HitObject;
|
||||
|
Loading…
Reference in New Issue
Block a user