···137 }
138 }
139140+ public bool FilteringActive
141+ {
142+ set { }
143+ }
144+145 public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
146147 protected override Container<Drawable> Content => flowContainer;
···178 Hide();
179 }
180 }
181+182+ public bool FilteringActive
183+ {
184+ set { }
185+ }
186 }
187188 private class SearchableText : SpriteText, IFilterable
···196 else
197 Hide();
198 }
199+ }
200+201+ public bool FilteringActive
202+ {
203+ set { }
204 }
205 }
206 }
+5
osu.Framework/Graphics/Containers/IFilterable.cs
···9 /// Whether the current object is matching (ie. visible) given the current filter criteria of a parent.
10 /// </summary>
11 bool MatchingFilter { set; }
0000012 }
13}
···9 /// Whether the current object is matching (ie. visible) given the current filter criteria of a parent.
10 /// </summary>
11 bool MatchingFilter { set; }
12+13+ /// <summary>
14+ /// Whether a filter is currently being performed.
15+ /// </summary>
16+ bool FilteringActive { set; }
17 }
18}
···26 {
27 searchTerm = value;
28 var terms = value.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
29- Children.OfType<IFilterable>().ForEach(child => match(child, terms));
30 }
31 }
3233- private static bool match(IFilterable filterable, IEnumerable<string> terms)
34 {
35 //Words matched by parent is not needed to match children
36 var childTerms = terms.Where(term =>
···44 //We need to check the children and should any child match this matches as well
45 if (hasFilterableChildren != null)
46 foreach (IFilterable child in hasFilterableChildren.FilterableChildren)
47- matching |= match(child, childTerms);
48049 return filterable.MatchingFilter = matching;
50 }
51 }
···26 {
27 searchTerm = value;
28 var terms = value.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
29+ Children.OfType<IFilterable>().ForEach(child => match(child, terms, terms.Length > 0));
30 }
31 }
3233+ private static bool match(IFilterable filterable, IEnumerable<string> terms, bool searchActive)
34 {
35 //Words matched by parent is not needed to match children
36 var childTerms = terms.Where(term =>
···44 //We need to check the children and should any child match this matches as well
45 if (hasFilterableChildren != null)
46 foreach (IFilterable child in hasFilterableChildren.FilterableChildren)
47+ matching |= match(child, childTerms, searchActive);
4849+ filterable.FilteringActive = searchActive;
50 return filterable.MatchingFilter = matching;
51 }
52 }