public override void GetInsertInfo(Vector2 worldPosition, out InsertInfo insertInfo) { insertInfo = new InsertInfo { target = stack, index = 0, localPosition = Vector2.zero }; foreach (VisualElement child in stack.Children()) { Vector2 localPos = child.WorldToLocal(worldPosition); if (child.ContainsPoint(localPos)) { insertInfo.index = stack.IndexOf(child); insertInfo.localPosition = child.ChangeCoordinatesTo(stack, child.GetRect().center); } } }
public override void GetInsertInfo(Vector2 worldPosition, out InsertInfo insertInfo) { insertInfo = new InsertInfo { target = stack, index = parent.IndexOf(this), localPosition = this.ChangeCoordinatesTo(stack, this.GetRect().center) }; }
public abstract void GetInsertInfo(Vector2 worldPosition, out InsertInfo insert);