mirror of
https://github.com/ppy/osu
synced 2025-02-09 06:36:56 +00:00
Add FadeDuration to control cursor trail fade
This commit is contained in:
parent
195f101799
commit
1d225ba81e
@ -72,6 +72,11 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The amount of time to fade the cursor trail pieces.
|
||||
/// </summary>
|
||||
protected virtual double FadeDuration => 300;
|
||||
|
||||
public override bool IsPresent => true;
|
||||
|
||||
protected override void Update()
|
||||
@ -82,7 +87,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||
|
||||
const int fade_clock_reset_threshold = 1000000;
|
||||
|
||||
time = (float)(Time.Current - timeOffset) / 300f;
|
||||
time = (float)((Time.Current - timeOffset) / FadeDuration);
|
||||
if (time > fade_clock_reset_threshold)
|
||||
resetTime();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user