Hook up now playing overlay to collections

This commit is contained in:
smoogipoo
2020-09-11 16:46:11 +09:00
parent a6a76de7a9
commit fcc8683629
6 changed files with 82 additions and 31 deletions

View File

@ -95,23 +95,40 @@ namespace osu.Game.Overlays.Music
return true;
}
private bool inSelectedCollection = true;
public bool InSelectedCollection
{
get => inSelectedCollection;
set
{
if (inSelectedCollection == value)
return;
inSelectedCollection = value;
updateFilter();
}
}
public IEnumerable<string> FilterTerms { get; }
private bool matching = true;
private bool matchingFilter = true;
public bool MatchingFilter
{
get => matching;
get => matchingFilter && inSelectedCollection;
set
{
if (matching == value) return;
if (matchingFilter == value)
return;
matching = value;
this.FadeTo(matching ? 1 : 0, 200);
matchingFilter = value;
updateFilter();
}
}
private void updateFilter() => this.FadeTo(MatchingFilter ? 1 : 0, 200);
public bool FilteringActive { get; set; }
}
}