mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Implement HitObjectContainer.Clear()
This commit is contained in:
parent
97dcd546f1
commit
86ef73aa27
@ -43,6 +43,15 @@ namespace osu.Game.Rulesets.UI
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void Clear(bool disposeChildren = true)
|
||||
{
|
||||
ClearInternal(disposeChildren);
|
||||
|
||||
foreach (var kvp in startTimeMap)
|
||||
kvp.Value.bindable.UnbindAll();
|
||||
startTimeMap.Clear();
|
||||
}
|
||||
|
||||
public int IndexOf(DrawableHitObject hitObject) => IndexOfInternal(hitObject);
|
||||
|
||||
private void onStartTimeChanged(DrawableHitObject hitObject)
|
||||
|
@ -58,6 +58,14 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
return result;
|
||||
}
|
||||
|
||||
public override void Clear(bool disposeChildren = true)
|
||||
{
|
||||
base.Clear(disposeChildren);
|
||||
|
||||
initialStateCache.Invalidate();
|
||||
hitObjectInitialStateCache.Clear();
|
||||
}
|
||||
|
||||
private float scrollLength;
|
||||
|
||||
protected override void Update()
|
||||
|
Loading…
Reference in New Issue
Block a user