示例#1
0
 internal void Add(UIVisibleObject obj)
 {
     obj.Parent = this;
     for (int i = 0; i < children.Count; i++)
     {
         if (children[i].Layer > obj.Layer)
         {
             children.Insert(i, obj);
             return;
         }
     }
     children.Add(obj);
 }
示例#2
0
 internal void Add(UIVisibleObject obj)
 {
     obj.Parent = this;
     for (int i = 0; i < children.Count; i++)
     {
         if (children[i].Layer > obj.Layer)
         {
             children.Insert(i, obj);
             return;
         }
     }
     children.Add(obj);
 }
示例#3
0
        private void SnapCam()
        {
            snaptarget = null;
            float intersize = 0;

            foreach (UIVisibleObject cell in cells)
            {
                if (cell.LocalBoundingBox.Intersects(cam.TargetView))
                {
                    float cis = cell.LocalBoundingBox.Intersection(cam.TargetView).Area;
                    if (cis > intersize)
                    {
                        intersize  = cis;
                        snaptarget = cell;
                    }
                }
            }
            if (snaptarget != null)
            {
                cam.EnsureVisible(snaptarget.LocalBoundingBox);
            }
        }
示例#4
0
 internal void Remove(UIVisibleObject obj)
 {
     children.Remove(obj);
     obj.Parent = null;
 }
示例#5
0
 internal void Remove(UIVisibleObject obj)
 {
     children.Remove(obj);
     obj.Parent = null;
 }
示例#6
0
 private void SnapCam()
 {
     snaptarget = null;
     float intersize = 0;
     foreach (UIVisibleObject cell in cells)
     {
         if (cell.LocalBoundingBox.Intersects(cam.TargetView))
         {
             float cis = cell.LocalBoundingBox.Intersection(cam.TargetView).Area;
             if (cis > intersize)
             {
                 intersize = cis;
                 snaptarget = cell;
             }
         }
     }
     if (snaptarget != null)
         cam.EnsureVisible(snaptarget.LocalBoundingBox);
 }