1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 23:01:03 +08:00

Merge pull request #31776 from frenzibyte/carousel-v2-depth-ordering

Fix depth ordering in new carousel not being relative to selected item
This commit is contained in:
Dean Herbert
2025-02-04 13:02:21 +09:00
committed by GitHub
Unverified
+2 -2
View File
@@ -544,8 +544,8 @@ namespace osu.Game.Screens.SelectV2
if (c.Item == null)
continue;
if (panel.Depth != c.DrawYPosition)
scroll.Panels.ChangeChildDepth(panel, (float)c.DrawYPosition);
double selectedYPos = currentSelection?.CarouselItem?.CarouselYPosition ?? 0;
scroll.Panels.ChangeChildDepth(panel, (float)Math.Abs(c.DrawYPosition - selectedYPos));
if (c.DrawYPosition != c.Item.CarouselYPosition)
c.DrawYPosition = Interpolation.DampContinuously(c.DrawYPosition, c.Item.CarouselYPosition, 50, Time.Elapsed);