From 5f0cd356d764ffab48ab4396c18f4a017600e4f0 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 11 Oct 2019 15:41:21 +0900 Subject: [PATCH] Rename startPosition to centrePosition --- osu.Game.Tests/Visual/Editor/TestSceneBeatSnapGrid.cs | 4 ++-- .../Screens/Edit/Compose/Components/BeatSnapGrid.cs | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Editor/TestSceneBeatSnapGrid.cs b/osu.Game.Tests/Visual/Editor/TestSceneBeatSnapGrid.cs index 6419b0c2e2..9f9b884cdd 100644 --- a/osu.Game.Tests/Visual/Editor/TestSceneBeatSnapGrid.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneBeatSnapGrid.cs @@ -133,8 +133,8 @@ namespace osu.Game.Tests.Visual.Editor public new float DistanceSpacing => base.DistanceSpacing; - public TestBeatSnapGrid(HitObject hitObject, Vector2 startPosition) - : base(hitObject, startPosition) + public TestBeatSnapGrid(HitObject hitObject, Vector2 centrePosition) + : base(hitObject, centrePosition) { } diff --git a/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs b/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs index 175d61fd32..24926995e6 100644 --- a/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs +++ b/osu.Game/Screens/Edit/Compose/Components/BeatSnapGrid.cs @@ -27,7 +27,11 @@ namespace osu.Game.Screens.Edit.Compose.Components /// protected float DistanceSpacing { get; private set; } - protected readonly Vector2 StartPosition; + /// + /// The position which the grid is centred on. + /// The first beat snapping tick is located at + in the desired direction. + /// + protected readonly Vector2 CentrePosition; [Resolved] private IEditorBeatmap beatmap { get; set; } @@ -44,10 +48,10 @@ namespace osu.Game.Screens.Edit.Compose.Components private double startTime; private double beatLength; - protected BeatSnapGrid(HitObject hitObject, Vector2 startPosition) + protected BeatSnapGrid(HitObject hitObject, Vector2 centrePosition) { this.hitObject = hitObject; - this.StartPosition = startPosition; + this.CentrePosition = centrePosition; RelativeSizeAxes = Axes.Both; }