1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 03:43:21 +08:00

Add caret transition to beatmap sort tab items

This commit is contained in:
Joseph Madamba 2024-07-08 16:46:35 -07:00
parent c100d1ab65
commit cd968d4185

View File

@ -126,7 +126,8 @@ namespace osu.Game.Overlays.BeatmapListing
Origin = Anchor.Centre,
AlwaysPresent = true,
Alpha = 0,
Size = new Vector2(6)
Size = new Vector2(6),
Icon = FontAwesome.Solid.CaretDown,
});
}
@ -136,7 +137,7 @@ namespace osu.Game.Overlays.BeatmapListing
SortDirection.BindValueChanged(direction =>
{
icon.Icon = direction.NewValue == Overlays.SortDirection.Ascending && Active.Value ? FontAwesome.Solid.CaretUp : FontAwesome.Solid.CaretDown;
icon.ScaleTo(direction.NewValue == Overlays.SortDirection.Ascending && Active.Value ? new Vector2(1f, -1f) : Vector2.One, 300, Easing.OutQuint);
}, true);
}