1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 15:27:20 +08:00

Merge pull request #28786 from Joehuu/sort-direction-caret-transition

Add caret transition to beatmap listing sort tab items
This commit is contained in:
Bartłomiej Dach 2024-07-09 10:52:11 +02:00 committed by GitHub
commit 13c8370823
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
}