Пример #1
0
    protected virtual void findObject()
    {
        _btnBack = FindGameObject(_rootPathName + "/button_back");

        _titleBg = FindGameObject(_rootPathName + "/titleBg");
        _titleLb = FindComponent <UILabel>(_rootPathName + "/titleBg/Label");
        _titleBg.SetActive(false);

        _listBg             = FindGameObject(_scrollPathName + "/content");
        _scrollView         = FindGameObject(_scrollPathName);
        _cellMgr            = FindGameObject(_scrollPathName + "/content").GetComponent <UIGridCellMgr>();
        _cellMgr.onShowItem = OnShowItem;

        _tabBg         = FindGameObject(_rootPathName + "/tab_bg");
        _tabCellPrefab = FindGameObject(_rootPathName + "/tabCell");
        _tabButtons    = new Transform[_tabNameList.Count];
        for (int i = 0; i < _tabNameList.Count; i++)
        {
            GameObject tabObj = NGUITools.AddChild(_tabBg, _tabCellPrefab);
            tabObj.SetActive(true);
            tabObj.transform.Find("Label").GetComponent <UILabel>().text = _tabNameList[i];
            ComponentData.Get(tabObj).Tag = i;
            _tabButtons[i] = tabObj.transform;
            UIEventListener.Get(tabObj).onClick = OnClickType;
        }
    }
Пример #2
0
 static public int set_getCellRealSize(IntPtr l)
 {
     try {
         UIGridCellMgr             self = (UIGridCellMgr)checkSelf(l);
         UIGridCellMgr.GetItemSize v;
         int op = LuaDelegation.checkDelegate(l, 2, out v);
         if (op == 0)
         {
             self.getCellRealSize = v;
         }
         else if (op == 1)
         {
             self.getCellRealSize += v;
         }
         else if (op == 2)
         {
             self.getCellRealSize -= v;
         }
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #3
0
 static public int ScrollCellToTop(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(UnityEngine.GameObject), typeof(int)))
         {
             UIGridCellMgr          self = (UIGridCellMgr)checkSelf(l);
             UnityEngine.GameObject a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             self.ScrollCellToTop(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(int), typeof(int)))
         {
             UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
             System.Int32  a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             self.ScrollCellToTop(a1, a2);
             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));
     }
 }
Пример #4
0
 static public int set_onHideItem(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         UIGridCellMgr.OnInitializeItem v;
         int op = LuaDelegation.checkDelegate(l, 2, out v);
         if (op == 0)
         {
             self.onHideItem = v;
         }
         else if (op == 1)
         {
             self.onHideItem += v;
         }
         else if (op == 2)
         {
             self.onHideItem -= v;
         }
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #5
0
 static public int UpdateCells(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         self.UpdateCells();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #6
0
 static public int get_CellCount(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.CellCount);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #7
0
 static public int DelteLastNode(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         self.DelteLastNode();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #8
0
 static public int RecoverSpawn(IntPtr l)
 {
     try {
         UIGridCellMgr          self = (UIGridCellMgr)checkSelf(l);
         UnityEngine.GameObject a1;
         checkType(l, 2, out a1);
         self.RecoverSpawn(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #9
0
 static public int set_Grid(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         UIGrid        v;
         checkType(l, 2, out v);
         self.Grid = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #10
0
 static public int set_Go(IntPtr l)
 {
     try {
         UIGridCellMgr          self = (UIGridCellMgr)checkSelf(l);
         UnityEngine.GameObject v;
         checkType(l, 2, out v);
         self.Go = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #11
0
 static public int set_preloadAmount(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         System.Int32  v;
         checkType(l, 2, out v);
         self.preloadAmount = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #12
0
    protected override void ReplaceAwake()
    {
        _ctrl = UIManager.GetControler <LoginInputController>();
        winBg = FindGameObject("Container");
        _phoneLoginContainer = FindGameObject("Container/phoneLoginContainer");
        _nameLb     = FindComponent <UIInput>("Container/phoneLoginContainer/name/nameLb");
        _passWordLb = FindComponent <UIInput>("Container/phoneLoginContainer/passWord/passWordLb");
        _btnPop     = FindGameObject("Container/phoneLoginContainer/name/btnPop");
        var registerBtn = FindGameObject("Container/phoneLoginContainer/registerBtn");
        var btnForget   = FindGameObject("Container/phoneLoginContainer/passWord/btnForget");

        UIEventListener.Get(FindGameObject("Container/phoneLoginContainer/loginBtn")).onClick = OnLoginHandler;
        UIEventListener.Get(registerBtn).onClick = OnRegisterHandler;
        UIEventListener.Get(_btnPop).onClick     = OnPopHandler;
        UIEventListener.Get(btnForget).onClick   = OnForgetPassWardHandler;
        UIEventListener.Get(FindGameObject("Container/phoneLoginContainer/btnClose")).onClick = OnCloseHandler;

        _registerBindingCtrl = UIManager.GetControler <RegisterBindingController>();

        _nameLb.defaultText = GameText.GetStr("login_name_default");
//        _nameLb.onChdjipange = OnNameLbChangeHandler
        _nameLb.onChange.Add(new EventDelegate(OnNameLbChangeHandler));
        _passWordLb.defaultText = GameText.GetStr("login_passWord_default");


        _resetPassWordContainer = FindGameObject("Container/resetPassWord");

        UIEventListener.Get(FindGameObject("Container/resetPassWord/btnClose")).onClick = OnCloseResetPassWordHandler;
        UIEventListener.Get(FindGameObject("Container/resetPassWord/btnSure")).onClick  = OnResetPassWordSureHandler;

        _resetNameLb           = FindComponent <UIInput>("Container/resetPassWord/name/nameLb");
        _resetNewPassWordLb    = FindComponent <UIInput>("Container/resetPassWord/newPassWord/nameLb");
        _resetVerificationLb   = FindComponent <UIInput>("Container/resetPassWord/verification/nameLb");
        _getVerification       = FindGameObject("Container/resetPassWord/verification/getVerification");
        _getVerificationGray   = FindGameObject("Container/resetPassWord/verification/getVerificationGray");
        _getVerificationGrayLb =
            FindComponent <UILabel>("Container/resetPassWord/verification/getVerificationGray/Label");
        UIEventListener.Get(_getVerification).onClick     = OnToGetVerificationHandler;
        UIEventListener.Get(_getVerificationGray).onClick = OnToGetVerificationHandler;
        _resetNameLb.defaultText        = GameText.GetStr("login_name_default");
        _resetNewPassWordLb.defaultText = GameText.GetStr("reset_passWord_default");


        _phonePopList               = FindGameObject("Container/phoneLoginContainer/name/popList");
        _phonePopListScrollView     = FindComponent <UIScrollView>("Container/phoneLoginContainer/name/popList/ScrollView");
        _phonePopListMgr            = FindComponent <UIGridCellMgr>("Container/phoneLoginContainer/name/popList/ScrollView/Grid");
        _phonePopListMgr.onShowItem = OnPopListShowViewItemShow;
    }
Пример #13
0
 static public int ScrollToPosition(IntPtr l)
 {
     try {
         UIGridCellMgr       self = (UIGridCellMgr)checkSelf(l);
         UnityEngine.Vector2 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.ScrollToPosition(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #14
0
 protected override void ReplaceAwake()
 {
     _container   = FindGameObject("Container/right/ScrollView/Container");
     _gridMgr     = FindComponent <UIGridCellMgr>("Container/right/ScrollView/Container");
     _center      = FindTransform("Container/right/center");
     _scrollView  = FindComponent <UIScrollView>("Container/right/ScrollView");
     _scrollPanel = _scrollView.transform.GetComponent <UIPanel>();
     if (_scrollView != null)
     {
         if (_scrollPanel != null)
         {
             _scrollPanel.onClipMove += OnMoveUpdate;
         }
         _scrollView.onStoppedMoving += OnMoveStop;
     }
 }
Пример #15
0
 static public int ScrollCellToIndex(IntPtr l)
 {
     try {
         UIGridCellMgr self = (UIGridCellMgr)checkSelf(l);
         System.Int32  a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         self.ScrollCellToIndex(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #16
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));
     }
 }