Simplify group filter display

This commit is contained in:
Dean Herbert
2019-08-25 11:38:26 +09:00
parent 524547adbf
commit a19a9b90ed
2 changed files with 5 additions and 35 deletions

View File

@ -231,11 +231,8 @@ namespace osu.Game.Screens.Select.Carousel
{
items.ForEach(item => item.Filtered.ValueChanged += _ =>
{
var hiddenItems = items.FindAll(i => !i.Filtered.Value);
var hasHidden = hiddenItems.Count > 0;
this.FadeTo(hasHidden ? 1 : 0.1f, 100);
Beatmaps = (hasHidden ? hiddenItems : items).Select(i => i.Beatmap).ToList();
// for now, fade the whole group based on the ratio of hidden items.
this.FadeTo(1 - 0.9f * ((float)items.Count(i => i.Filtered.Value) / items.Count), 100);
});
}
}