mirror of
https://github.com/ppy/osu.git
synced 2025-02-01 07:12:57 +08:00
6027947657
With the animation logic being external, it was going to make it very hard to apply the scroll offset when a new panel is added or removed before the current selection. There's no real reason for the animations to be local to beatmap carousel. If there's a usage in the future where the animation is to change, we can add more customisation to `Carousel` itself.
24 lines
920 B
C#
24 lines
920 B
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.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>
|
|
/// 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; }
|
|
}
|
|
}
|