| | |
| | | {
|
| | | [SerializeField] ItemCell itemCell;
|
| | | [SerializeField] Text itemName;
|
| | | [SerializeField] Image sourceImg;
|
| | |
|
| | | public void Display(int index, string replaceItemName)
|
| | | public void Display(int index)
|
| | | {
|
| | | int itemID = ConfirmCancel.getItems[index].id;
|
| | | itemCell.Init(new ItemCellModel(itemID, false, ConfirmCancel.getItems[index].countEx));
|
| | | var item = ConfirmCancel.getItems[index];
|
| | | int itemID = item.id;
|
| | | itemCell.Init(new ItemCellModel(itemID, false, item.countEx));
|
| | | itemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemTipUtility.Show(itemID);
|
| | | });
|
| | | itemName.text = string.IsNullOrEmpty(replaceItemName) ? ItemConfig.Get(itemID).ItemName : replaceItemName;
|
| | | itemName.text = string.IsNullOrEmpty(item.dataEx) ? ItemConfig.Get(itemID).ItemName : item.dataEx;
|
| | |
|
| | | sourceImg.SetActive(item.useType != 0);
|
| | | sourceImg.SetSprite($"AwardMark{item.useType}");
|
| | | sourceImg.SetNativeSize();
|
| | | }
|
| | | }
|