1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-08 07:02:54 +08:00
osu-lazer/osu.Game/Screens/SelectV2/ICarouselPanel.cs
Dean Herbert 980f6cf18e
Make CarouselItem sealed and remove BeatmapCarouselItem concept
Less abstraction is better. As far as I can tell, we don't need a custom
model for this. If there's any tracking to be done, it should be done
within `BeatmapCarousel`'s implementation (or a filter).
2025-01-23 18:48:44 +09:00

37 lines
1.4 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
using osu.Framework.Graphics;
namespace osu.Game.Screens.SelectV2
{
/// <summary>
/// An interface to be attached to any <see cref="Drawable"/>s which are used for display inside a <see cref="Carousel{T}"/>.
/// </summary>
public interface ICarouselPanel
{
/// <summary>
/// Whether this item has selection.
/// This is managed by <see cref="Carousel{T}"/> and should not be set manually.
/// </summary>
BindableBool Selected { get; }
/// <summary>
/// Whether this item has keyboard selection.
/// This is managed by <see cref="Carousel{T}"/> and should not be set manually.
/// </summary>
BindableBool KeyboardSelected { get; }
/// <summary>
/// The Y position which should be used for displaying this item within the carousel. This is managed by <see cref="Carousel{T}"/> and should not be set manually.
/// </summary>
double DrawYPosition { get; set; }
/// <summary>
/// The carousel item this drawable is representing. This is managed by <see cref="Carousel{T}"/> and should not be set manually.
/// </summary>
CarouselItem? Item { get; set; }
}
}