mirror of
https://github.com/ppy/osu.git
synced 2026-05-23 22:44:54 +08:00
Don't delay scroll on hover of playlist items
This commit is contained in:
@@ -27,6 +27,10 @@ namespace osu.Game.Overlays
|
||||
|
||||
private bool allowScrolling = true;
|
||||
|
||||
/// <summary>
|
||||
/// Time in milliseconds before scrolling begins.
|
||||
/// </summary>
|
||||
public double InitialMoveDelay { get; set; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Anchor"/> to anchor the content to if it does not overflow.
|
||||
@@ -45,7 +49,6 @@ namespace osu.Game.Overlays
|
||||
|
||||
private Func<Drawable>? createContent;
|
||||
|
||||
private const float initial_move_delay = 1000;
|
||||
private const float pixels_per_second = 50;
|
||||
private const float padding = 15;
|
||||
|
||||
@@ -105,7 +108,7 @@ namespace osu.Game.Overlays
|
||||
float targetX = mainContent.DrawWidth + padding;
|
||||
|
||||
flow.MoveToX(0)
|
||||
.Delay(initial_move_delay)
|
||||
.Delay(InitialMoveDelay)
|
||||
.MoveToX(-targetX, targetX * 1000 / pixels_per_second)
|
||||
.Loop();
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace osu.Game.Overlays.Music
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
InitialMoveDelay = 0,
|
||||
AllowScrolling = false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user