1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Add scrolling direction toggle for mania selection blueprint test scene

This commit is contained in:
ekrctb 2021-06-15 15:22:36 +09:00
parent 403aa433cf
commit a431b4eeda
3 changed files with 32 additions and 13 deletions

View File

@ -30,10 +30,10 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
set => scrollingTestContainer.Direction = value;
}
protected ManiaSelectionBlueprintTestScene()
protected ManiaSelectionBlueprintTestScene(int columns)
{
var stageDefinitions = new List<StageDefinition> { new StageDefinition { Columns = 1 } };
base.Content.Child = scrollingTestContainer = new ScrollingTestContainer(ScrollingDirection.Down)
var stageDefinitions = new List<StageDefinition> { new StageDefinition { Columns = columns } };
base.Content.Child = scrollingTestContainer = new ScrollingTestContainer(ScrollingDirection.Up)
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
@ -48,6 +48,8 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
}
}
};
AddToggleStep("Downward scroll", b => Direction = b ? ScrollingDirection.Down : ScrollingDirection.Up);
}
}
}

View File

@ -12,13 +12,22 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
public class TestSceneHoldNoteSelectionBlueprint : ManiaSelectionBlueprintTestScene
{
public TestSceneHoldNoteSelectionBlueprint()
: base(4)
{
var holdNote = new HoldNote { Column = 0, Duration = 500 };
holdNote.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
for (int i = 0; i < 4; i++)
{
var holdNote = new HoldNote
{
Column = i,
StartTime = i * 100,
Duration = 500
};
holdNote.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
var drawableHitObject = new DrawableHoldNote(holdNote);
Playfield.Add(drawableHitObject);
AddBlueprint(new HoldNoteSelectionBlueprint(holdNote), drawableHitObject);
var drawableHitObject = new DrawableHoldNote(holdNote);
Playfield.Add(drawableHitObject);
AddBlueprint(new HoldNoteSelectionBlueprint(holdNote), drawableHitObject);
}
}
}
}

View File

@ -12,13 +12,21 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
public class TestSceneNoteSelectionBlueprint : ManiaSelectionBlueprintTestScene
{
public TestSceneNoteSelectionBlueprint()
: base(4)
{
var note = new Note { Column = 0 };
note.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
for (int i = 0; i < 4; i++)
{
var note = new Note
{
Column = i,
StartTime = i * 200,
};
note.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
var drawableHitObject = new DrawableNote(note);
Playfield.Add(drawableHitObject);
AddBlueprint(new NoteSelectionBlueprint(note), drawableHitObject);
var drawableHitObject = new DrawableNote(note);
Playfield.Add(drawableHitObject);
AddBlueprint(new NoteSelectionBlueprint(note), drawableHitObject);
}
}
}
}