1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:02:58 +08:00

Apply NRT to CarouselGroup

This commit is contained in:
Dean Herbert 2022-01-21 13:09:03 +09:00
parent 5b24800b0e
commit bed7b69464

View File

@ -3,7 +3,8 @@
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
#nullable enable
namespace osu.Game.Screens.Select.Carousel
{
@ -12,7 +13,7 @@ namespace osu.Game.Screens.Select.Carousel
/// </summary>
public class CarouselGroup : CarouselItem
{
public override DrawableCarouselItem CreateDrawableRepresentation() => null;
public override DrawableCarouselItem? CreateDrawableRepresentation() => null;
public IReadOnlyList<CarouselItem> Children => InternalChildren;
@ -24,6 +25,10 @@ namespace osu.Game.Screens.Select.Carousel
/// </summary>
private ulong currentChildID;
private Comparer<CarouselItem>? criteriaComparer;
private FilterCriteria? lastCriteria;
public virtual void RemoveChild(CarouselItem i)
{
InternalChildren.Remove(i);
@ -54,7 +59,7 @@ namespace osu.Game.Screens.Select.Carousel
}
}
public CarouselGroup(List<CarouselItem> items = null)
public CarouselGroup(List<CarouselItem>? items = null)
{
if (items != null) InternalChildren = items;
@ -77,11 +82,6 @@ namespace osu.Game.Screens.Select.Carousel
};
}
private Comparer<CarouselItem> criteriaComparer;
[CanBeNull]
private FilterCriteria lastCriteria;
public override void Filter(FilterCriteria criteria)
{
base.Filter(criteria);