| | |
| | | using UnityEngine; |
| | | |
| | | namespace vnxbqy.UI |
| | | public class MailInfoAwardItemCell : CellView |
| | | { |
| | | public class MailInfoAwardItemCell : CellView |
| | | [SerializeField] ItemCell itemCell; |
| | | [SerializeField] ImageEx imgHave; |
| | | MailManager model { get { return MailManager.Instance; } } |
| | | public void Display(int index, CellView cellView) |
| | | { |
| | | [SerializeField] ItemCell itemCell; |
| | | [SerializeField] ImageEx imgHave; |
| | | MailManager model { get { return MailManager.Instance; } } |
| | | public void Display(int index, CellView cellView) |
| | | { |
| | | int mailState = cellView.info.Value.infoInt1;//0-未知;1-未读;2-已读;3-已领; |
| | | if (!model.TryGetMailData(model.nowUuid, out MailData mailData) || mailData == null || mailData.Items == null) |
| | | return; |
| | | if (index < 0 || index >= mailData.Items.Count) |
| | | return; |
| | | MailItemData data = mailData.Items[index]; |
| | | itemCell.Init(new ItemCellModel((int)data.ItemID, true, (ulong)data.Count)); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show((int)data.ItemID)); |
| | | imgHave.SetActive(mailState == 3); |
| | | int mailState = cellView.info.Value.infoInt1;//0-未知;1-未读;2-已读;3-已领; |
| | | if (!model.TryGetMailData(model.nowUuid, out MailData mailData) || mailData == null || mailData.Items == null) |
| | | return; |
| | | if (index < 0 || index >= mailData.Items.Count) |
| | | return; |
| | | MailItemData data = mailData.Items[index]; |
| | | itemCell.Init(new ItemCellModel((int)data.ItemID, true, (ulong)data.Count)); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show((int)data.ItemID)); |
| | | imgHave.SetActive(mailState == 3); |
| | | |
| | | MailCategory mailCategory = (MailCategory)cellView.info.Value.infoInt1; |
| | | var list = model.GetSortMailScrList(mailCategory); |
| | | } |
| | | MailCategory mailCategory = (MailCategory)cellView.info.Value.infoInt1; |
| | | var list = model.GetSortMailScrList(mailCategory); |
| | | } |
| | | } |
| | | } |