FairyGUI.GRoot.HidePopup C# (CSharp) Method

HidePopup() public method

Close a popup.
public HidePopup ( GObject popup ) : void
popup GObject
return void
        public void HidePopup(GObject popup)
        {
            if (popup != null)
            {
                int k = _popupStack.IndexOf(popup);
                if (k != -1)
                {
                    for (int i = _popupStack.Count - 1; i >= k; i--)
                    {
                        int last = _popupStack.Count - 1;
                        ClosePopup(_popupStack[last]);
                        _popupStack.RemoveAt(last);
                    }
                }
            }
            else
            {
                foreach (GObject obj in _popupStack)
                    ClosePopup(obj);
                _popupStack.Clear();
            }
        }

Same methods

GRoot::HidePopup ( ) : void

Usage Example

Example #1
0
    static int HidePopup(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.GRoot)))
            {
                FairyGUI.GRoot obj = (FairyGUI.GRoot)ToLua.ToObject(L, 1);
                obj.HidePopup();
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.GRoot), typeof(FairyGUI.GObject)))
            {
                FairyGUI.GRoot   obj  = (FairyGUI.GRoot)ToLua.ToObject(L, 1);
                FairyGUI.GObject arg0 = (FairyGUI.GObject)ToLua.ToObject(L, 2);
                obj.HidePopup(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.GRoot.HidePopup"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of FairyGUI.GRoot::HidePopup