少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-26 82931aabaaa3e479bc04e11630a77cd9c9dd5fe3
System/Compose/New/ComposeEquipWin.cs
@@ -1,6 +1,7 @@
using Snxxz.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
@@ -210,19 +211,26 @@
                if (secondTypeDict.Count >= 1 && curSecondType != 0
                    && curThirdType >= 1)
                {
                    int remain = curSecondType - firstTypeDict.Count;
                    if(remain > 0)
                    {
                        cellCtrl.JumpIndex(curSecondType- remain);
                    }
                    else
                    {
                        cellCtrl.JumpIndex(curSecondType - 1);
                    }
                    cellCtrl.JumpIndex(GetCurIndex(curSecondType));
                }
            }
        }
        private int GetCurIndex(int secondType)
        {
            int curIndex = 0;
            List<int> secondlist = firstTypeDict.Keys.ToList();
            for(int i = 0; i < secondlist.Count; i++)
            {
                if(secondType == secondlist[i])
                {
                    curIndex = i;
                    break;
                }
            }
            return curIndex;
        }
        private void RefreshCell(ScrollerDataType type, CellView cell)
        {
            Image icon = cell.transform.Find("BtnIcon").GetComponent<Image>();