Instantiate highlight background container on animation

Also removes the necessity of scheduling as it actually never worked as
intended, `Scheduler` will still update even when the chat line is
masked away, and the animation will never be held anyways.

The new duration of the animation should be enough for long scrolls
either way.
This commit is contained in:
Salman Ahmed
2022-03-10 03:47:48 +03:00
parent d4de435eb2
commit b25c37ce62
2 changed files with 22 additions and 17 deletions

View File

@ -102,7 +102,7 @@ namespace osu.Game.Overlays.Chat
{
float center = scroll.GetChildPosInContent(chatLine, chatLine.DrawSize / 2) - scroll.DisplayableContent / 2;
scroll.ScrollTo(Math.Clamp(center, 0, scroll.ScrollableExtent));
chatLine.ScheduleHighlight();
chatLine.Highlight();
}
highlightedMessage.Value = null;