FairyGUI.GRoot.GetTopWindow C# (CSharp) Method

GetTopWindow() public method

Get window on top.
public GetTopWindow ( ) : Window
return Window
        public Window GetTopWindow()
        {
            int cnt = this.numChildren;
            for (int i = cnt - 1; i >= 0; i--)
            {
                GObject g = this.GetChildAt(i);
                if (g is Window)
                {
                    return (Window)(g);
                }
            }

            return null;
        }

Usage Example

 static public int GetTopWindow(IntPtr l)
 {
     try {
         FairyGUI.GRoot self = (FairyGUI.GRoot)checkSelf(l);
         var            ret  = self.GetTopWindow();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GRoot::GetTopWindow