mirror of
https://github.com/ppy/osu.git
synced 2025-02-25 15:12:57 +08:00
Move activation drawable flow portion to ICarouselPanel
This commit is contained in:
parent
92429b2ed9
commit
9366bfbf0d
@ -124,15 +124,6 @@ namespace osu.Game.Screens.SelectV2
|
||||
}
|
||||
}
|
||||
|
||||
protected override void HandleItemActivated(CarouselItem item)
|
||||
{
|
||||
base.HandleItemActivated(item);
|
||||
|
||||
// TODO: maybe this should be handled by the panel itself?
|
||||
if (GetMaterialisedDrawableForItem(item) is BeatmapCarouselPanel drawable)
|
||||
drawable.FlashFromActivation();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Filtering
|
||||
|
@ -123,7 +123,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
|
||||
public double DrawYPosition { get; set; }
|
||||
|
||||
public void FlashFromActivation()
|
||||
public void Activated()
|
||||
{
|
||||
activationFlash.FadeOutFromOne(500, Easing.OutQuint);
|
||||
}
|
||||
|
@ -109,7 +109,10 @@ namespace osu.Game.Screens.SelectV2
|
||||
}
|
||||
|
||||
if (currentSelection.CarouselItem != null)
|
||||
{
|
||||
(GetMaterialisedDrawableForItem(currentSelection.CarouselItem) as ICarouselPanel)?.Activated();
|
||||
HandleItemActivated(currentSelection.CarouselItem);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -23,6 +23,11 @@ namespace osu.Game.Screens.SelectV2
|
||||
/// </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>
|
||||
|
Loading…
Reference in New Issue
Block a user