| | |
| | | using Snxxz.UI;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
| | | 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>();
|