void OnChangeSort(uint sortMask) { itemPackage.SortItemFilterInfoList(sortMask); tableView.DataCount = itemPackage.GetItemFilterInfoList().Count; tableView.ItemCount = 4; tableView.TableChange(); tableView.gameObject.GetComponent <UIScrollView>().ResetPosition(); //change label }
public override void DrawCell(int i, int index, int count = 0) { base.DrawCell(i, index, count); int dataCount = mIndex; List <NItemInfo> itemInfoList = itemPackage.GetItemFilterInfoList(); info = itemInfoList[dataCount]; var itemDataMap = ConfigDataStatic.GetConfigDataTable("ITEM_RES"); if (!itemDataMap.ContainsKey(info.configID)) { Debug.Log(string.Format("item configID={0} cant find config", info.configID)); return; } ITEM_RES itemConfigData = itemDataMap[info.configID] as ITEM_RES; nameLabel.text = itemConfigData.MinName; numLabel.text = GlobalFunction.NumberFormat(info.number); iconSprite.spriteName = itemConfigData.IconName; }