mirror of
https://github.com/ppy/osu.git
synced 2025-03-11 07:57:18 +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:
commit
ec88c5ed75
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user