1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:47:24 +08:00

Only retrieve colour once.

This commit is contained in:
Dean Herbert 2017-05-01 19:32:00 +09:00
parent 0f4ef16910
commit c59589eba7

View File

@ -58,14 +58,22 @@ namespace osu.Game.Overlays.Music
public class FilterTextBox : SearchTextBox
{
protected override Color4 BackgroundUnfocused => OsuColour.FromHex(@"222222");
protected override Color4 BackgroundFocused => OsuColour.FromHex(@"222222");
private Color4 backgroundColour;
protected override Color4 BackgroundUnfocused => backgroundColour;
protected override Color4 BackgroundFocused => backgroundColour;
public FilterTextBox()
{
Masking = true;
CornerRadius = 5;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
backgroundColour = colours.Gray2;
}
}
private class CollectionsDropdown<T> : OsuDropdown<T>
@ -126,4 +134,4 @@ namespace osu.Game.Overlays.Music
}
}
}
}
}