mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Hook up now playing overlay to collections
This commit is contained in:
@ -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; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user