mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 13:45:59 +08:00
parent
112496204d
commit
d78f1d158d
@ -131,7 +131,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
if (editorClock == null)
|
if (editorClock == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float distanceForCurrentTime = snapProvider.DurationToDistance(referenceObject, editorClock.CurrentTime - referenceObject.StartTime);
|
float distanceForCurrentTime = snapProvider.DurationToDistance(referenceObject, editorClock.CurrentTime - referenceObject.GetEndTime());
|
||||||
float timeBasedAlpha = Math.Clamp(1 - Math.Abs(distanceForCurrentTime - Size.X / 2) / 30, 0, 1);
|
float timeBasedAlpha = Math.Clamp(1 - Math.Abs(distanceForCurrentTime - Size.X / 2) / 30, 0, 1);
|
||||||
|
|
||||||
Colour = baseColour.Opacity(Math.Max(baseColour.A, timeBasedAlpha));
|
Colour = baseColour.Opacity(Math.Max(baseColour.A, timeBasedAlpha));
|
||||||
|
Loading…
Reference in New Issue
Block a user