1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 16:12:57 +08:00

Animate scroll for a better visual experience

This commit is contained in:
Dean Herbert 2022-09-21 14:50:23 +09:00
parent 087ca59ebb
commit b04871f40a

View File

@ -119,7 +119,7 @@ namespace osu.Game.Screens.Play.HUD
if (requiresScroll && trackedScore != null) if (requiresScroll && trackedScore != null)
{ {
float scrollTarget = scroll.GetChildPosInContent(trackedScore) + trackedScore.DrawHeight / 2 - scroll.DrawHeight / 2; float scrollTarget = scroll.GetChildPosInContent(trackedScore) + trackedScore.DrawHeight / 2 - scroll.DrawHeight / 2;
scroll.ScrollTo(scrollTarget, false); scroll.ScrollTo(scrollTarget);
} }
const float panel_height = GameplayLeaderboardScore.PANEL_HEIGHT; const float panel_height = GameplayLeaderboardScore.PANEL_HEIGHT;