mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Rename DistanceBetweenTick
to be plural
This commit is contained in:
@ -30,14 +30,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
Position = StartPosition,
|
||||
Width = crosshair_thickness,
|
||||
EdgeSmoothness = new Vector2(1),
|
||||
Height = Math.Min(crosshair_max_size, DistanceBetweenTick * 2),
|
||||
Height = Math.Min(crosshair_max_size, DistanceBetweenTicks * 2),
|
||||
},
|
||||
new Box
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Position = StartPosition,
|
||||
EdgeSmoothness = new Vector2(1),
|
||||
Width = Math.Min(crosshair_max_size, DistanceBetweenTick * 2),
|
||||
Width = Math.Min(crosshair_max_size, DistanceBetweenTicks * 2),
|
||||
Height = crosshair_thickness,
|
||||
}
|
||||
});
|
||||
@ -45,11 +45,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
float dx = Math.Max(StartPosition.X, DrawWidth - StartPosition.X);
|
||||
float dy = Math.Max(StartPosition.Y, DrawHeight - StartPosition.Y);
|
||||
float maxDistance = new Vector2(dx, dy).Length;
|
||||
int requiredCircles = Math.Min(MaxIntervals, (int)(maxDistance / DistanceBetweenTick));
|
||||
int requiredCircles = Math.Min(MaxIntervals, (int)(maxDistance / DistanceBetweenTicks));
|
||||
|
||||
for (int i = 0; i < requiredCircles; i++)
|
||||
{
|
||||
float radius = (i + 1) * DistanceBetweenTick * 2;
|
||||
float radius = (i + 1) * DistanceBetweenTicks * 2;
|
||||
|
||||
AddInternal(new CircularProgress
|
||||
{
|
||||
@ -80,7 +80,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
float travelLength = travelVector.Length;
|
||||
|
||||
// FindSnappedDistance will always round down, but we want to potentially round upwards.
|
||||
travelLength += DistanceBetweenTick / 2;
|
||||
travelLength += DistanceBetweenTicks / 2;
|
||||
|
||||
// When interacting with the resolved snap provider, the distance spacing multiplier should first be removed
|
||||
// to allow for snapping at a non-multiplied ratio.
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// <summary>
|
||||
/// The spacing between each tick of the beat snapping grid.
|
||||
/// </summary>
|
||||
protected float DistanceBetweenTick { get; private set; }
|
||||
protected float DistanceBetweenTicks { get; private set; }
|
||||
|
||||
protected IBindable<double> DistanceSpacingMultiplier { get; private set; }
|
||||
|
||||
@ -34,7 +34,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
/// <summary>
|
||||
/// The position which the grid should start.
|
||||
/// The first beat snapping tick is located at <see cref="StartPosition"/> + <see cref="DistanceBetweenTick"/> away from this point.
|
||||
/// The first beat snapping tick is located at <see cref="StartPosition"/> + <see cref="DistanceBetweenTicks"/> away from this point.
|
||||
/// </summary>
|
||||
protected readonly Vector2 StartPosition;
|
||||
|
||||
@ -93,7 +93,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
private void updateSpacing()
|
||||
{
|
||||
DistanceBetweenTick = (float)(SnapProvider.GetBeatSnapDistanceAt(ReferenceObject) * DistanceSpacingMultiplier.Value);
|
||||
DistanceBetweenTicks = (float)(SnapProvider.GetBeatSnapDistanceAt(ReferenceObject) * DistanceSpacingMultiplier.Value);
|
||||
|
||||
if (LatestEndTime == null)
|
||||
MaxIntervals = int.MaxValue;
|
||||
@ -101,7 +101,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
// +1 is added since a snapped hitobject may have its start time slightly less than the snapped time due to floating point errors
|
||||
double maxDuration = LatestEndTime.Value - StartTime + 1;
|
||||
MaxIntervals = (int)(maxDuration / SnapProvider.DistanceToDuration(ReferenceObject, DistanceBetweenTick));
|
||||
MaxIntervals = (int)(maxDuration / SnapProvider.DistanceToDuration(ReferenceObject, DistanceBetweenTicks));
|
||||
}
|
||||
|
||||
gridCache.Invalidate();
|
||||
|
Reference in New Issue
Block a user