FairyGUI.GRoot.ShowWindow C# (CSharp) Method

ShowWindow() public method

Display a window.
public ShowWindow ( Window win ) : void
win Window
return void
        public void ShowWindow(Window win)
        {
            AddChild(win);

            if (win.x > this.width)
                win.x = this.width - win.width;
            else if (win.x + win.width < 0)
                win.x = 0;
            if (win.y > this.height)
                win.y = this.height - win.height;
            else if (win.y + win.height < 0)
                win.y = 0;

            AdjustModalLayer();
        }

Usage Example

示例#1
0
        public void BringToFront()
        {
            GRoot r = this.root;

            if (r == null)
            {
                r = GRoot.inst;
            }
            r.ShowWindow(this);
        }
All Usage Examples Of FairyGUI.GRoot::ShowWindow