From c59589eba70437f3afc2c3d7c71cbc1ebf6a92a9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 1 May 2017 19:32:00 +0900 Subject: [PATCH] Only retrieve colour once. --- osu.Game/Overlays/Music/FilterControl.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Music/FilterControl.cs b/osu.Game/Overlays/Music/FilterControl.cs index 82f05fa53c..c6572c5ed2 100644 --- a/osu.Game/Overlays/Music/FilterControl.cs +++ b/osu.Game/Overlays/Music/FilterControl.cs @@ -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 : OsuDropdown @@ -126,4 +134,4 @@ namespace osu.Game.Overlays.Music } } } -} \ No newline at end of file +}