mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Fix time based distance grid alpha not correctly accounting for distance spacing multiplier
This commit is contained in:
parent
723fce8174
commit
71758390b5
@ -131,7 +131,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (editorClock == null)
|
||||
return;
|
||||
|
||||
float distanceForCurrentTime = snapProvider.DurationToDistance(referenceObject, editorClock.CurrentTime - referenceObject.GetEndTime());
|
||||
float distanceSpacingMultiplier = (float)snapProvider.DistanceSpacingMultiplier.Value;
|
||||
double timeFromReferencePoint = editorClock.CurrentTime - referenceObject.GetEndTime();
|
||||
|
||||
float distanceForCurrentTime = snapProvider.DurationToDistance(referenceObject, timeFromReferencePoint)
|
||||
* distanceSpacingMultiplier;
|
||||
|
||||
float timeBasedAlpha = 1 - Math.Clamp(Math.Abs(distanceForCurrentTime - Size.X / 2) / 30, 0, 1);
|
||||
|
||||
Colour = baseColour.Opacity(Math.Max(baseColour.A, timeBasedAlpha));
|
||||
|
Loading…
Reference in New Issue
Block a user