public void Add(int pageIndex) { if (_items == null) { _items = new List <string>(); } string id = controller.GetPageId(pageIndex); int i = _items.IndexOf(id); if (i == -1) { _items.Add(id); } }
static int GetPageId(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.Controller obj = (FairyGUI.Controller)ToLua.CheckObject <FairyGUI.Controller>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); string o = obj.GetPageId(arg0); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }