HidePopup() public method

Close all popups.
public HidePopup ( ) : void
return void
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));
        }
    }
 static public int HidePopup(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             FairyGUI.GRoot self = (FairyGUI.GRoot)checkSelf(l);
             self.HidePopup();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             FairyGUI.GRoot   self = (FairyGUI.GRoot)checkSelf(l);
             FairyGUI.GObject a1;
             checkType(l, 2, out a1);
             self.HidePopup(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #3
0
        private void __clickItem(EventContext context)
        {
            GButton item = ((GObject)context.data).asButton;

            if (item == null)
            {
                return;
            }

            if (item.grayed)
            {
                _list.selectedIndex = -1;
                return;
            }

            Controller c = item.GetController("checked");

            if (c != null && c.selectedIndex != 0)
            {
                if (c.selectedIndex == 1)
                {
                    c.selectedIndex = 2;
                }
                else
                {
                    c.selectedIndex = 1;
                }
            }

            GRoot r = (GRoot)_contentPane.parent;

            r.HidePopup(this.contentPane);
            if (item.data is EventCallback0)
            {
                ((EventCallback0)item.data)();
            }
            else if (item.data is EventCallback1)
            {
                ((EventCallback1)item.data)(context);
            }
        }