FairyGUI.GRoot.TogglePopup C# (CSharp) Method

TogglePopup() public method

If a popup is showing, then close it; otherwise, open it.
public TogglePopup ( GObject popup ) : void
popup GObject
return void
        public void TogglePopup(GObject popup)
        {
            TogglePopup(popup, null, null);
        }

Same methods

GRoot::TogglePopup ( GObject popup, GObject target ) : void
GRoot::TogglePopup ( GObject popup, GObject target, object downward ) : void

Usage Example

Example #1
0
        private void __mousedown()
        {
            _down = true;
            Stage.inst.onMouseUp.Add(__mouseup);

            if (_mode == ButtonMode.Common)
            {
                SetState(DOWN);
            }

            if (linkedPopup != null)
            {
                if (linkedPopup is Window)
                {
                    ((Window)linkedPopup).ToggleStatus();
                }
                else
                {
                    GRoot r = this.root;
                    if (r != null)
                    {
                        r.TogglePopup(linkedPopup, this);
                    }
                }
            }
        }
All Usage Examples Of FairyGUI.GRoot::TogglePopup