Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 4
0
 internal void Remove(UIVisibleObject obj)
 {
     children.Remove(obj);
     obj.Parent = null;
 }
Exemplo n.º 5
0
 internal void Remove(UIVisibleObject obj)
 {
     children.Remove(obj);
     obj.Parent = null;
 }
Exemplo n.º 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);
 }