diff --git a/osu.Game.Rulesets.Mania/Tests/TestCaseManiaHitObjects.cs b/osu.Game.Rulesets.Mania/Tests/TestCaseManiaHitObjects.cs index 03886f5784..48974b4bb8 100644 --- a/osu.Game.Rulesets.Mania/Tests/TestCaseManiaHitObjects.cs +++ b/osu.Game.Rulesets.Mania/Tests/TestCaseManiaHitObjects.cs @@ -78,7 +78,7 @@ namespace osu.Game.Rulesets.Mania.Tests RelativeChildSize = new Vector2(1, 10000), Children = new[] { - new DrawableHoldNote(new HoldNote(), ManiaAction.Key1) + new DrawableHoldNote(new HoldNote(){Duration = 1000}, ManiaAction.Key1) { Y = 5000, Height = 1000, diff --git a/osu.Game.Rulesets.Mania/Tests/TestCaseManiaPlayfield.cs b/osu.Game.Rulesets.Mania/Tests/TestCaseManiaPlayfield.cs index defe1a6ba6..c77a0cd2a9 100644 --- a/osu.Game.Rulesets.Mania/Tests/TestCaseManiaPlayfield.cs +++ b/osu.Game.Rulesets.Mania/Tests/TestCaseManiaPlayfield.cs @@ -41,6 +41,36 @@ namespace osu.Game.Rulesets.Mania.Tests AddStep("Right special style", () => createPlayfield(4, SpecialColumnPosition.Right)); AddStep("5 columns", () => createPlayfield(5, SpecialColumnPosition.Normal)); AddStep("8 columns", () => createPlayfield(8, SpecialColumnPosition.Normal)); + AddStep("4 + 4 columns", () => + { + var stages = new List() + { + new StageDefinition() { Columns = 4 }, + new StageDefinition() { Columns = 4 }, + }; + createPlayfield(stages, SpecialColumnPosition.Normal); + }); + AddStep("2 + 4 + 2 columns", () => + { + var stages = new List() + { + new StageDefinition() { Columns = 2 }, + new StageDefinition() { Columns = 4 }, + new StageDefinition() { Columns = 2 }, + }; + createPlayfield(stages, SpecialColumnPosition.Normal); + }); + AddStep("1 + 1 + 8 columns", () => + { + var stages = new List() + { + new StageDefinition() { Columns = 1 }, + new StageDefinition() { Columns = 8 }, + new StageDefinition() { Columns = 1 }, + }; + createPlayfield(stages, SpecialColumnPosition.Normal); + }); + AddStep("Left special style", () => createPlayfield(8, SpecialColumnPosition.Left)); AddStep("Right special style", () => createPlayfield(8, SpecialColumnPosition.Right)); AddStep("Reversed", () => createPlayfield(4, SpecialColumnPosition.Normal, true)); @@ -78,16 +108,22 @@ namespace osu.Game.Rulesets.Mania.Tests private ManiaPlayfield createPlayfield(int cols, SpecialColumnPosition specialPos, bool inverted = false) { - Clear(); - - var inputManager = new ManiaInputManager(maniaRuleset, cols) { RelativeSizeAxes = Axes.Both }; - Add(inputManager); - - ManiaPlayfield playfield; var stages = new List() { new StageDefinition() { Columns = cols }, }; + return createPlayfield(stages, specialPos, inverted); + } + + private ManiaPlayfield createPlayfield(List stages, SpecialColumnPosition specialPos, bool inverted = false) + { + Clear(); + + var inputManager = new ManiaInputManager(maniaRuleset, stages.Sum(g => g.Columns)) { RelativeSizeAxes = Axes.Both }; + Add(inputManager); + + ManiaPlayfield playfield; + inputManager.Add(playfield = new ManiaPlayfield(stages) { Anchor = Anchor.Centre, diff --git a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs index ef611bb591..26db5aa5b0 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs @@ -11,7 +11,6 @@ using osu.Framework.MathUtils; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Rulesets.Mania.Beatmaps; -using osu.Game.Rulesets.Mania.Mods; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Mania.Replays;