Пример #1
0
        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);
                }
            }
        }
Пример #2
0
 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)
     };
 }
Пример #3
0
 public abstract void GetInsertInfo(Vector2 worldPosition, out InsertInfo insert);