Update with framework bindable changes

This commit is contained in:
smoogipoo
2019-02-21 18:56:34 +09:00
parent d637b184e4
commit bca347427f
195 changed files with 567 additions and 555 deletions

View File

@ -13,9 +13,9 @@ namespace osu.Game.Screens.Select.Carousel
{
public CarouselGroupEagerSelect()
{
State.ValueChanged += v =>
State.ValueChanged += e =>
{
if (v == CarouselItemState.Selected)
if (e.NewValue == CarouselItemState.Selected)
attemptSelection();
};
}
@ -81,10 +81,10 @@ namespace osu.Game.Screens.Select.Carousel
if (filteringChildren) return;
// we only perform eager selection if we are a currently selected group.
if (State != CarouselItemState.Selected) return;
if (State.Value != CarouselItemState.Selected) return;
// we only perform eager selection if none of our children are in a selected state already.
if (Children.Any(i => i.State == CarouselItemState.Selected)) return;
if (Children.Any(i => i.State.Value == CarouselItemState.Selected)) return;
PerformSelection();
}
@ -92,8 +92,8 @@ namespace osu.Game.Screens.Select.Carousel
protected virtual void PerformSelection()
{
CarouselItem nextToSelect =
Children.Skip(lastSelectedIndex).FirstOrDefault(i => !i.Filtered) ??
Children.Reverse().Skip(InternalChildren.Count - lastSelectedIndex).FirstOrDefault(i => !i.Filtered);
Children.Skip(lastSelectedIndex).FirstOrDefault(i => !i.Filtered.Value) ??
Children.Reverse().Skip(InternalChildren.Count - lastSelectedIndex).FirstOrDefault(i => !i.Filtered.Value);
if (nextToSelect != null)
nextToSelect.State.Value = CarouselItemState.Selected;