2024-09-04 19:07:31 +08:00
|
|
|
// 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.Pooling;
|
|
|
|
using osu.Game.Rulesets.Objects.Pooling;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
|
|
|
{
|
2024-09-04 19:25:29 +08:00
|
|
|
public partial class ClickMarkerContainer : PooledDrawableWithLifetimeContainer<AnalysisFrameEntry, HitMarker>
|
2024-09-04 19:07:31 +08:00
|
|
|
{
|
2024-09-04 19:25:29 +08:00
|
|
|
private readonly DrawablePool<HitMarkerClick> clickMarkerPool;
|
2024-09-04 19:07:31 +08:00
|
|
|
|
2024-09-04 19:17:22 +08:00
|
|
|
public ClickMarkerContainer()
|
2024-09-04 19:07:31 +08:00
|
|
|
{
|
2024-09-04 19:25:29 +08:00
|
|
|
AddInternal(clickMarkerPool = new DrawablePool<HitMarkerClick>(30));
|
2024-09-04 19:07:31 +08:00
|
|
|
}
|
|
|
|
|
2024-09-04 19:25:29 +08:00
|
|
|
protected override HitMarker GetDrawable(AnalysisFrameEntry entry) => clickMarkerPool.Get(d => d.Apply(entry));
|
2024-09-04 19:07:31 +08:00
|
|
|
}
|
|
|
|
}
|