Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions osu.Game/Overlays/Settings/SettingsSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@

private bool matchingFilter = true;

private static void showIFilterableChildren(Drawable drawable)
{
if (drawable is IFilterable filterable)
filterable.MatchingFilter = true;
if (drawable is IContainerEnumerable<Drawable> container)
{
foreach (var child in container.Children)
showIFilterableChildren(child);
}
}
public bool MatchingFilter
{
get => matchingFilter;
Expand All @@ -51,6 +61,12 @@

matchingFilter = value;

if (matchingFilter && FilteringActive)
{
foreach (var child in Children)
showIFilterableChildren(child);
}

if (IsPresent != wasPresent)
Invalidate(Invalidation.Presence);
}
Expand Down
Loading