1
0
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:
Dean Herbert
2025-04-07 20:51:32 +09:00
Unverified
parent 881785900a
commit 60e6b56b66
2 changed files with 6 additions and 2 deletions
+5 -2
View File
@@ -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();
}
+1
View File
@@ -47,6 +47,7 @@ namespace osu.Game.Overlays.Music
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
RelativeSizeAxes = Axes.X,
InitialMoveDelay = 0,
AllowScrolling = false,
};