예제 #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.rect.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, rect.center)
     };
 }
예제 #3
0
 public abstract void GetInsertInfo(Vector2 worldPosition, out InsertInfo insert);