1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00

Add back left offset for selected set

This commit is contained in:
Dean Herbert 2020-10-12 18:19:10 +09:00
parent 3cfc0dc82d
commit 5c2f134665
2 changed files with 4 additions and 13 deletions

View File

@ -702,20 +702,10 @@ namespace osu.Game.Screens.Select
{
visibleItems.Add(set);
yPositions.Add(currentY);
//lastSet = set;
// TODO: move this logic to DCBS too.
// set.MoveToX(set.Item.State.Value == CarouselItemState.Selected ? -100 : 0, 500, Easing.OutExpo);
// set.MoveToY(currentY, 750, Easing.OutExpo);
currentY += set.TotalHeight + panel_padding;
break;
}
default:
continue;
//
// break;
// }
}
}

View File

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@ -153,9 +152,11 @@ namespace osu.Game.Screens.Select.Carousel
beatmapSetState.BindValueChanged(setSelected, true);
}
private void setSelected(ValueChangedEvent<CarouselItemState> obj)
private void setSelected(ValueChangedEvent<CarouselItemState> selected)
{
switch (obj.NewValue)
BorderContainer.MoveToX(selected.NewValue == CarouselItemState.Selected ? -100 : 0, 500, Easing.OutExpo);
switch (selected.NewValue)
{
default:
foreach (var beatmap in beatmapContainer)