// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Bindables; namespace osu.Game.Screens.SelectV2 { /// /// Represents a single display item for display in a . /// This is used to house information related to the attached model that helps with display and tracking. /// public abstract class CarouselItem : IComparable { public readonly BindableBool Selected = new BindableBool(); /// /// The model this item is representing. /// public readonly object Model; /// /// The current Y position in the carousel. This is managed by and should not be set manually. /// public double CarouselYPosition { get; set; } /// /// The height this item will take when displayed. /// public abstract float DrawHeight { get; } protected CarouselItem(object model) { Model = model; } public int CompareTo(CarouselItem? other) { if (other == null) return 1; return CarouselYPosition.CompareTo(other.CarouselYPosition); } } }