using vnxbqy.UI;
|
using System.Collections.Generic;
|
using System.Linq;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
public class EquipShenDecomMaterialCell : ILBehaviour
|
{
|
List<ItemCell> itemCells = new List<ItemCell>();
|
|
|
protected override void Awake()
|
{
|
itemCells.Add(proxy.GetWidgtEx<ItemCell>("itemcell1"));
|
itemCells.Add(proxy.GetWidgtEx<ItemCell>("itemcell2"));
|
itemCells.Add(proxy.GetWidgtEx<ItemCell>("itemcell3"));
|
}
|
|
public void Display(int startIndex)
|
{
|
var keys = EquipEvolveModel.Instance.shenDecomMaterials.Keys.ToList();
|
keys.Sort();
|
for (int i = 0; i < 3; i++)
|
{
|
var index = startIndex + i;
|
if (index < EquipEvolveModel.Instance.shenDecomMaterials.Count)
|
{
|
itemCells[i].SetActiveIL(true);
|
var model = new ItemCellModel(keys[index], false, (ulong)EquipEvolveModel.Instance.shenDecomMaterials[keys[index]]);
|
itemCells[i].Init(model);
|
itemCells[i].button.SetListener(()=> {
|
ItemTipUtility.Show(keys[index]);
|
});
|
continue;
|
}
|
|
itemCells[i].SetActiveIL(false);
|
}
|
}
|
}
|