FairyGUI.GRoot.BringToFront C# (CSharp) Method

BringToFront() public method

将一个窗口提到所有窗口的最前面
public BringToFront ( Window win ) : void
win Window
return void
        public void BringToFront(Window win)
        {
            int cnt = this.numChildren;
            int i;
            if (this._modalLayer.parent != null && !win.modal)
                i = this.GetChildIndex(this._modalLayer) - 1;
            else
                i = cnt - 1;

            for (; i >= 0; i--)
            {
                GObject g = this.GetChildAt(i);
                if (g == win)
                    return;
                if (g is Window)
                    break;
            }

            if (i >= 0)
                this.SetChildIndex(win, i);
        }

Usage Example

 static public int BringToFront(IntPtr l)
 {
     try {
         FairyGUI.GRoot  self = (FairyGUI.GRoot)checkSelf(l);
         FairyGUI.Window a1;
         checkType(l, 2, out a1);
         self.BringToFront(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GRoot::BringToFront