1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 02:22:55 +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 public class FilterTextBox : SearchTextBox
{ {
protected override Color4 BackgroundUnfocused => OsuColour.FromHex(@"222222"); private Color4 backgroundColour;
protected override Color4 BackgroundFocused => OsuColour.FromHex(@"222222");
protected override Color4 BackgroundUnfocused => backgroundColour;
protected override Color4 BackgroundFocused => backgroundColour;
public FilterTextBox() public FilterTextBox()
{ {
Masking = true; Masking = true;
CornerRadius = 5; CornerRadius = 5;
} }
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
backgroundColour = colours.Gray2;
}
} }
private class CollectionsDropdown<T> : OsuDropdown<T> private class CollectionsDropdown<T> : OsuDropdown<T>