mirror of
https://github.com/ppy/osu.git
synced 2025-02-25 18:22:55 +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
|
#endregion
|
||||||
|
|
||||||
#region Filtering
|
#region Filtering
|
||||||
|
@ -123,7 +123,7 @@ namespace osu.Game.Screens.SelectV2
|
|||||||
|
|
||||||
public double DrawYPosition { get; set; }
|
public double DrawYPosition { get; set; }
|
||||||
|
|
||||||
public void FlashFromActivation()
|
public void Activated()
|
||||||
{
|
{
|
||||||
activationFlash.FadeOutFromOne(500, Easing.OutQuint);
|
activationFlash.FadeOutFromOne(500, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,10 @@ namespace osu.Game.Screens.SelectV2
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentSelection.CarouselItem != null)
|
if (currentSelection.CarouselItem != null)
|
||||||
|
{
|
||||||
|
(GetMaterialisedDrawableForItem(currentSelection.CarouselItem) as ICarouselPanel)?.Activated();
|
||||||
HandleItemActivated(currentSelection.CarouselItem);
|
HandleItemActivated(currentSelection.CarouselItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -23,6 +23,11 @@ namespace osu.Game.Screens.SelectV2
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
BindableBool KeyboardSelected { get; }
|
BindableBool KeyboardSelected { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when the panel is activated. Should be used to update the panel's visual state.
|
||||||
|
/// </summary>
|
||||||
|
void Activated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Y position used internally for positioning in the carousel.
|
/// The Y position used internally for positioning in the carousel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user