예제 #1
0
파일: UIPanel.cs 프로젝트: halak/bibim
 protected bool RemoveAt(int index)
 {
     if (0 <= index && index < children.Count)
     {
         UIVisual child = children[index];
         children.RemoveAt(index);
         child.Parent = null;
         OnChildRemoved(child);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
파일: UIPanel.cs 프로젝트: halak/bibim
        protected void Add(UIVisual item)
        {
            if (item == null)
            {
                return;
            }

            int zOrder = item.ZOrder;

            for (int i = children.Count - 1; i >= 0; i--)
            {
                if (zOrder >= children[i].ZOrder)
                {
                    Insert(i + 1, item);
                    return;
                }
            }

            Insert(0, item);
        }
예제 #3
0
파일: UIPanel.cs 프로젝트: halak/bibim
        private void Insert(int index, UIVisual item)
        {
            index = MathExtension.Clamp(index, 0, children.Count);

            if (item.Parent != null)
            {
                item.Parent.Remove(item);
            }

            Debug.Assert(item.Parent == null);

            item.Parent = this;

            if (index < children.Count)
            {
                children.Insert(index, item);
            }
            else
            {
                children.Add(item);
            }

            OnChildAdded(item);
        }
예제 #4
0
파일: UIPanel.cs 프로젝트: halak/bibim
 protected bool Remove(UIVisual item)
 {
     return(RemoveAt(children.IndexOf(item)));
 }
예제 #5
0
파일: UIPanel.cs 프로젝트: halak/bibim
 internal void BringChildToFront(UIVisual child)
 {
 }
예제 #6
0
파일: UIPanel.cs 프로젝트: halak/bibim
 internal void SendChildToBack(UIVisual child)
 {
 }
예제 #7
0
파일: UIPanel.cs 프로젝트: halak/bibim
 internal void OnChildZOrderChanged(UIVisual child, int old)
 {
 }
예제 #8
0
파일: UIPanel.cs 프로젝트: halak/bibim
 protected virtual void OnChildrenRemoved(UIVisual item)
 {
 }
예제 #9
0
파일: UIPanel.cs 프로젝트: halak/bibim
 protected virtual void OnChildAdded(UIVisual item)
 {
 }
예제 #10
0
파일: UIWindow.cs 프로젝트: halak/bibim
 public void RemoveChild(UIVisual item)
 {
     Remove(item);
 }
예제 #11
0
파일: UIWindow.cs 프로젝트: halak/bibim
 public void AddChild(UIVisual item)
 {
     Add(item);
 }