fix rectangular and triangular grid tests

This commit is contained in:
OliBomby 2023-12-31 16:54:04 +01:00
parent 20e338b892
commit 8425c7226c
2 changed files with 16 additions and 9 deletions

View File

@ -52,12 +52,15 @@ namespace osu.Game.Tests.Visual.Editing
{
RectangularPositionSnapGrid grid = null;
AddStep("create grid", () => Child = grid = new RectangularPositionSnapGrid()
AddStep("create grid", () =>
{
RelativeSizeAxes = Axes.Both,
StartPosition = position,
Spacing = spacing,
GridLineRotation = rotation
Child = grid = new RectangularPositionSnapGrid
{
RelativeSizeAxes = Axes.Both,
};
grid.StartPosition.Value = position;
grid.Spacing.Value = spacing;
grid.GridLineRotation.Value = rotation;
});
AddStep("add snapping cursor", () => Add(new SnappingCursorContainer

View File

@ -52,11 +52,15 @@ namespace osu.Game.Tests.Visual.Editing
{
TriangularPositionSnapGrid grid = null;
AddStep("create grid", () => Child = grid = new TriangularPositionSnapGrid(position)
AddStep("create grid", () =>
{
RelativeSizeAxes = Axes.Both,
Spacing = spacing,
GridLineRotation = rotation
Child = grid = new TriangularPositionSnapGrid
{
RelativeSizeAxes = Axes.Both,
};
grid.StartPosition.Value = position;
grid.Spacing.Value = spacing;
grid.GridLineRotation.Value = rotation;
});
AddStep("add snapping cursor", () => Add(new SnappingCursorContainer