diff --git a/osu.Framework/Graphics/Cursor/CursorEffectContainer.cs b/osu.Framework/Graphics/Cursor/CursorEffectContainer.cs
index 5866b0e6f5..83285e9d3d 100644
--- a/osu.Framework/Graphics/Cursor/CursorEffectContainer.cs
+++ b/osu.Framework/Graphics/Cursor/CursorEffectContainer.cs
@@ -12,6 +12,11 @@
namespace osu.Framework.Graphics.Cursor
{
+ ///
+ /// An abstract container type that handles positional input for many drawables of type .
+ ///
+ /// The derived container type.
+ /// The target drawable type.
public abstract partial class CursorEffectContainer : Container
where TSelf : CursorEffectContainer
where TTarget : class, IDrawable
@@ -27,14 +32,14 @@ protected override void LoadComplete()
}
private readonly HashSet childDrawables = new HashSet();
- private readonly HashSet nestedTtcChildDrawables = new HashSet();
+ private readonly HashSet nestedContainerChildDrawables = new HashSet();
private readonly List newChildDrawables = new List();
private readonly List targetChildren = new List();
private void findTargetChildren()
{
Debug.Assert(childDrawables.Count == 0, $"{nameof(childDrawables)} should be empty but has {childDrawables.Count} elements.");
- Debug.Assert(nestedTtcChildDrawables.Count == 0, $"{nameof(nestedTtcChildDrawables)} should be empty but has {nestedTtcChildDrawables.Count} elements.");
+ Debug.Assert(nestedContainerChildDrawables.Count == 0, $"{nameof(nestedContainerChildDrawables)} should be empty but has {nestedContainerChildDrawables.Count} elements.");
Debug.Assert(newChildDrawables.Count == 0, $"{nameof(newChildDrawables)} should be empty but has {newChildDrawables.Count} elements.");
Debug.Assert(targetChildren.Count == 0, $"{nameof(targetChildren)} should be empty but has {targetChildren.Count} elements.");
@@ -95,14 +100,14 @@ private void findTargetChildren()
{
var d = newChildDrawables[j];
- if (d.Parent == this || (!(d.Parent is TSelf) && !nestedTtcChildDrawables.Contains(d.Parent)))
+ if (d.Parent == this || (!(d.Parent is TSelf) && !nestedContainerChildDrawables.Contains(d.Parent)))
continue;
- nestedTtcChildDrawables.Add(d);
+ nestedContainerChildDrawables.Add(d);
}
// Ignore drawables whose effects are managed by a nested effect container.
- if (nestedTtcChildDrawables.Contains(candidate))
+ if (nestedContainerChildDrawables.Contains(candidate))
continue;
// We found a valid candidate; keep track of it
@@ -112,13 +117,18 @@ private void findTargetChildren()
private static readonly SlimReadOnlyListWrapper empty_list = new SlimReadOnlyListWrapper(new List(0));
+ ///
+ /// Returns currently hovered child drawables of type .
+ ///
+ /// The list of candidate drawables in top-down order (see ).
+ /// Only drawables where is true are considered. When multiple are nested, only the closest parent container receives the candidate.
protected SlimReadOnlyListWrapper FindTargets()
{
findTargetChildren();
// Clean up
childDrawables.Clear();
- nestedTtcChildDrawables.Clear();
+ nestedContainerChildDrawables.Clear();
newChildDrawables.Clear();
if (targetChildren.Count == 0)