1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-15 14:13:01 +08:00
Files
osu-lazer/osu.Game/Graphics/Carousel/ICarouselPanel.cs
T
Dean Herbert 0aff50fbf5 Rename song select v2 classes and namespaces
This aims to bring some conformity to naming to make it easier to
understand component structure for new components.

Renames are pulled out of the song select v2 changes and are more
relevant there due to many new classes being added.

- `V2` suffix is dropped, with v2 components being moved to a relevant V2 namespace.
- Related classes have a prefix of the area they are used.
- Experimenting with using partial/nested classes in the song select v2 implementation.
  Not committing to this yet but want to see how it plays out.
- Moved base carousel components to a generic namespace to avoid confusion with actual beatmap carousel implementation.
2025-04-16 18:34:53 +09:00

47 lines
1.8 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;
using osu.Framework.Graphics.Pooling;
namespace osu.Game.Graphics.Carousel
{
/// <summary>
/// An interface to be attached to any <see cref="Drawable"/>s which are used for display inside a <see cref="Carousel{T}"/>.
/// Importantly, all properties in this interface are managed by <see cref="Carousel{T}"/> and should not be written to elsewhere.
/// </summary>
public interface ICarouselPanel
{
/// <summary>
/// Whether this item has selection (see <see cref="Carousel{T}.CurrentSelection"/>). Should be read from to update the visual state.
/// </summary>
BindableBool Selected { get; }
/// <summary>
/// Whether this item is expanded (see <see cref="CarouselItem.IsExpanded"/>). Should be read from to update the visual state.
/// </summary>
BindableBool Expanded { get; }
/// <summary>
/// Whether this item has keyboard selection. Should be read from to update the visual state.
/// </summary>
BindableBool KeyboardSelected { get; }
/// <summary>
/// Called when the panel is activated. Should be used to update the panel's visual state.
/// </summary>
void Activated();
/// <summary>
/// The Y position used internally for positioning in the carousel.
/// </summary>
double DrawYPosition { get; set; }
/// <summary>
/// The carousel item this drawable is representing. Will be set before <see cref="PoolableDrawable.PrepareForUse"/> is called.
/// </summary>
CarouselItem? Item { get; set; }
}
}