Пример #1
0
    void Start()
    {
        string allUserName = _ctrl.GetAllUserName();

        if (allUserName != "")
        {
            JSONObject userList = new JSONObject(allUserName);
//            _phonePopList.Clear();
            _popList.Clear();
            _phonePopListMgr.ClearCells();
            if (userList[0].Count >= 2)
            {
                userList[0].list.Reverse();
            }
            for (int i = 0; i < userList[0].Count; i++)
            {
                if (i == 0)
                {
                    _nameLb.value = userList[0].list[i].str;
                    if (GameDataMgr.LOGIN_DATA.lastLoginAccount.Equals(_nameLb.value))
                    {
                        _passWordLb.value = GameDataMgr.LOGIN_DATA.lastLoginPassword;
                    }
                }
//                _phonePopList.AddItem(userList[0].list[i].str);
                _popList.Add(userList[0].list[i].str);
                _phonePopListMgr.NewCellsBox(_phonePopListMgr.Go);
            }
        }

        _phonePopListScrollView.ResetPosition();
        _phonePopListMgr.Grid.Reposition();
        _phonePopListMgr.UpdateCells();

        _ctrl.SetScrollViewRenderQueue(_phonePopListScrollView.gameObject);
        _phonePopList.gameObject.SetActive(false);

        _phoneLoginContainer.SetActive(true);
        _resetPassWordContainer.SetActive(false);
    }
Пример #2
0
    public virtual void UpdateList(int tabIndex = -1)
    {
        if (tabIndex == -1)
        {
            tabIndex = _tabIndex;
        }
        int listDataCount = getListDataCount(tabIndex);

        if (listDataCount == 0)
        {
            return;
        }

        for (var i = 0; i < listDataCount; i++)
        {
            UIWidget cellBox = _cellMgr.NewCellsBox(_listBg);
            changeCellBoxInfo(cellBox);
        }

        repositionScroll();
    }
Пример #3
0
 static public int NewCellsBox(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UIGridCellMgr          self = (UIGridCellMgr)checkSelf(l);
             UnityEngine.GameObject a1;
             checkType(l, 2, out a1);
             var ret = self.NewCellsBox(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 4)
         {
             UIGridCellMgr          self = (UIGridCellMgr)checkSelf(l);
             UnityEngine.GameObject a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             var ret = self.NewCellsBox(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }