public void UnSelectedOthers(ItemButtonView itemView) { for (int i = 0; i < itemViews.Count; i++) { ItemButtonView other = itemViews[i]; if (other.itemData.typeCode == itemView.itemData.typeCode && other.itemData.isSelected) { other.itemData.isSelected = false; other.UpdateState(); } } }
public void OnShow(List <_SourceItemData> list) { if (list == null || list.Count <= 0) { return; } ResetViews(); int count = 0; foreach (_SourceItemData item in list) { ItemButtonView itemView = prefabItemView.Spawn(); itemView.OnShow(item, this); itemViews.Add(itemView); count++; } UGUIGridFix.refreshGrid(count, gridTransform, 200, 30, 1080, 64); }