1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-08 05:52:54 +08:00

Fix filtered grouped difficulty items in DrawableCarouselBeatmapSet aren't hidden on first load

This commit is contained in:
Andrei Zavatski 2019-08-26 14:11:24 +03:00
parent d11930d90c
commit fd0f42eee4

View File

@ -222,12 +222,10 @@ namespace osu.Game.Screens.Select.Carousel
{ {
public FilterableGroupedDifficultyIcon(List<CarouselBeatmap> items, RulesetInfo ruleset) public FilterableGroupedDifficultyIcon(List<CarouselBeatmap> items, RulesetInfo ruleset)
: base(items.Select(i => i.Beatmap).ToList(), ruleset, Color4.White) : base(items.Select(i => i.Beatmap).ToList(), ruleset, Color4.White)
{
items.ForEach(item => item.Filtered.ValueChanged += _ =>
{ {
// for now, fade the whole group based on the ratio of hidden items. // 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); items.ForEach(item => item.Filtered.BindValueChanged(_
}); => this.FadeTo(1 - 0.9f * ((float)items.Count(i => i.Filtered.Value) / items.Count), 100), true));
} }
} }
} }