// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; 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 sealed class CarouselItem : IComparable { public const float DEFAULT_HEIGHT = 40; /// /// 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. Defaults to . /// public float DrawHeight { get; set; } = DEFAULT_HEIGHT; /// /// Whether this item should be a valid target for user group selection hotkeys. /// public bool IsGroupSelectionTarget { get; set; } /// /// Whether this item is visible or collapsed (hidden). /// public bool IsVisible { get; set; } = true; public CarouselItem(object model) { Model = model; } public int CompareTo(CarouselItem? other) { if (other == null) return 1; return CarouselYPosition.CompareTo(other.CarouselYPosition); } } }