diff --git a/osu.Game.Rulesets.Mania/ManiaRuleset.cs b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
index befa657715..64f02f45ec 100644
--- a/osu.Game.Rulesets.Mania/ManiaRuleset.cs
+++ b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
@@ -155,7 +155,7 @@ namespace osu.Game.Rulesets.Mania
SpecialKey = InputKey.Space,
SpecialAction = ManiaAction.Special1,
NormalActionStart = ManiaAction.Key1,
- }.GenerateKeyBindingsFor(variant);
+ }.GenerateKeyBindingsFor(variant, out _);
case ManiaKeyBindingVariantType.Coop:
case ManiaKeyBindingVariantType.Versus:
getMultiVariantKeyCounts(variant, out int p1K, out int p2K);
@@ -179,7 +179,7 @@ namespace osu.Game.Rulesets.Mania
SpecialKey = InputKey.Tilde,
SpecialAction = ManiaAction.Special1,
NormalActionStart = ManiaAction.Key1
- }.GenerateKeyBindingsFor(p1K);
+ }.GenerateKeyBindingsFor(p1K, out var nextNormal);
var player2Bindings = new VariantMappingGenerator
{
@@ -199,8 +199,8 @@ namespace osu.Game.Rulesets.Mania
},
SpecialKey = InputKey.BackSlash,
SpecialAction = ManiaAction.Special2,
- NormalActionStart = ManiaAction.Key1 + p1K
- }.GenerateKeyBindingsFor(p2K);
+ NormalActionStart = nextNormal
+ }.GenerateKeyBindingsFor(p2K, out _);
return player1Bindings.Concat(player2Bindings);
}
@@ -300,8 +300,9 @@ namespace osu.Game.Rulesets.Mania
/// Generates a list of s for a specific number of columns.
///
/// The number of columns that need to be bound.
+ /// The next to use for normal columns.
/// The keybindings.
- public IEnumerable GenerateKeyBindingsFor(int columns)
+ public IEnumerable GenerateKeyBindingsFor(int columns, out ManiaAction nextNormalAction)
{
ManiaAction currentNormalAction = NormalActionStart;
@@ -316,6 +317,7 @@ namespace osu.Game.Rulesets.Mania
if (columns % 2 == 1)
bindings.Add(new KeyBinding(SpecialKey, SpecialAction));
+ nextNormalAction = currentNormalAction;
return bindings;
}
}
diff --git a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
index 101586f3e4..e787b70797 100644
--- a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
+++ b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
@@ -48,10 +48,12 @@ namespace osu.Game.Rulesets.Mania.UI
Content = new[] { new Drawable[stageDefinitions.Count] }
};
+ var normalColumnAction = ManiaAction.Key1;
+ var specialColumnAction = ManiaAction.Special1;
int firstColumnIndex = 0;
for (int i = 0; i < stageDefinitions.Count; i++)
{
- var newStage = new ManiaStage(i, firstColumnIndex, stageDefinitions[i]);
+ var newStage = new ManiaStage(firstColumnIndex, stageDefinitions[i], ref normalColumnAction, ref specialColumnAction);
newStage.SpecialColumn.BindTo(SpecialColumnPosition);
newStage.VisibleTimeRange.BindTo(VisibleTimeRange);
newStage.Inverted.BindTo(Inverted);
diff --git a/osu.Game.Rulesets.Mania/UI/ManiaStage.cs b/osu.Game.Rulesets.Mania/UI/ManiaStage.cs
index 115a3cadb7..ec21c72285 100644
--- a/osu.Game.Rulesets.Mania/UI/ManiaStage.cs
+++ b/osu.Game.Rulesets.Mania/UI/ManiaStage.cs
@@ -49,14 +49,12 @@ namespace osu.Game.Rulesets.Mania.UI
private List normalColumnColours = new List();
private Color4 specialColumnColour;
- private readonly int stageIndex;
private readonly int firstColumnIndex;
private readonly StageDefinition definition;
- public ManiaStage(int stageIndex, int firstColumnIndex, StageDefinition definition)
+ public ManiaStage(int firstColumnIndex, StageDefinition definition, ref ManiaAction normalColumnStartAction, ref ManiaAction specialColumnStartAction)
: base(ScrollingDirection.Up)
{
- this.stageIndex = stageIndex;
this.firstColumnIndex = firstColumnIndex;
this.definition = definition;
@@ -134,7 +132,16 @@ namespace osu.Game.Rulesets.Mania.UI
};
for (int i = 0; i < definition.Columns; i++)
- AddColumn(new Column());
+ {
+ var isSpecial = isSpecialColumn(i);
+ var column = new Column
+ {
+ IsSpecial = isSpecial,
+ Action = isSpecial ? specialColumnStartAction++ : normalColumnStartAction++
+ };
+
+ AddColumn(column);
+ }
Inverted.ValueChanged += invertedChanged;
Inverted.TriggerChange();
@@ -153,13 +160,6 @@ namespace osu.Game.Rulesets.Mania.UI
topLevelContainer.Add(c.TopLevelContainer.CreateProxy());
columnFlow.Add(c);
AddNested(c);
-
- c.IsSpecial = isSpecialColumn(Columns.Count - 1);
-
- if (c.IsSpecial)
- c.Action = ManiaAction.Special1 + stageIndex;
- else
- c.Action = ManiaAction.Key1 + firstColumnIndex + Columns.Count - 1;
}
///