mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +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 DrawablePool<DrawableManiaJudgement> judgementPool;
|
||||||
|
|
||||||
private readonly Drawable barLineContainer;
|
private readonly Drawable barLineContainer;
|
||||||
private readonly Container topLevelContainer;
|
|
||||||
|
|
||||||
private readonly Dictionary<ColumnType, Color4> columnColours = new Dictionary<ColumnType, Color4>
|
private readonly Dictionary<ColumnType, Color4> columnColours = new Dictionary<ColumnType, Color4>
|
||||||
{
|
{
|
||||||
@ -60,6 +59,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
||||||
|
|
||||||
|
Container topLevelContainer;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
judgementPool = new DrawablePool<DrawableManiaJudgement>(2),
|
judgementPool = new DrawablePool<DrawableManiaJudgement>(2),
|
||||||
@ -116,6 +117,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
for (int i = 0; i < definition.Columns; i++)
|
for (int i = 0; i < definition.Columns; i++)
|
||||||
{
|
{
|
||||||
var columnType = definition.GetTypeOfColumn(i);
|
var columnType = definition.GetTypeOfColumn(i);
|
||||||
|
|
||||||
var column = new Column(firstColumnIndex + i)
|
var column = new Column(firstColumnIndex + i)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -125,17 +127,12 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
Action = { Value = columnType == ColumnType.Special ? specialColumnStartAction++ : normalColumnStartAction++ }
|
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)
|
public override void Add(DrawableHitObject h)
|
||||||
{
|
{
|
||||||
var maniaObject = (ManiaHitObject)h.HitObject;
|
var maniaObject = (ManiaHitObject)h.HitObject;
|
||||||
|
Loading…
Reference in New Issue
Block a user