Fix dropdown item hover colour not being set in time

Turns out to be an osu!-side issue. The colour transform was being
shortcutted for the non-displayed case, which meant it was not in a good
state in time for the first hover.

Closes https://github.com/ppy/osu/issues/18163#issuecomment-1120747301
This commit is contained in:
Dean Herbert 2022-05-09 19:48:53 +09:00
parent 642e006267
commit 70a90722e8

View File

@ -184,14 +184,12 @@ namespace osu.Game.Graphics.UserInterface
protected override void UpdateBackgroundColour()
{
if (!IsPreSelected && !IsSelected)
{
Background.FadeOut(600, Easing.OutQuint);
return;
}
Background.FadeIn(100, Easing.OutQuint);
Background.FadeColour(IsPreSelected ? BackgroundColourHover : BackgroundColourSelected, 100, Easing.OutQuint);
if (IsPreSelected || IsSelected)
Background.FadeIn(100, Easing.OutQuint);
else
Background.FadeOut(600, Easing.OutQuint);
}
protected override void UpdateForegroundColour()