using TMPro; using UnityEngine; using IVDataFormat; using UnityEngine.UI; public class EScrNotice : EScrCell { private Image imgIcon; private ButtonIV btnView; private TextMeshProUGUI txtHeader, txtTitle, txtDate; public override void InitCell() { Transform trf = transform; imgIcon = trf.Find("icon").GetComponent(); txtHeader = trf.Find("txtHeader").GetComponent(); txtTitle = trf.Find("txtTitle").GetComponent(); txtDate = trf.Find("txtDate").GetComponent(); btnView = trf.Find("btnView").GetComponent(); btnView.transform.GetChild(0).GetComponent().text = LocalizationText.GetText("all_see"); } public override void Localize() { btnView.transform.GetChild(0).GetComponent().text = LocalizationText.GetText("all_see"); } public override void SetData(int itemid) { itemID = itemid; dNotice data = DataHandler.GetNotice(itemid); if (data == null) return; ////imgIcon.sprite = MailMgr.SGetIconClose(); //txtHeader.text = LocalizationText.GetText(data.title); txtTitle.text = data.GetTitle(); txtDate.text = FormatString.TextDateTimeUtc9Line1(data.endAt); //txtDate.text = null; } public override void RefreshCellView() { base.RefreshCellView(); SetData(itemID); } public void BtnView() { SoundMgr.PlaySfx(SoundName.BtnPress); NoticeMgr.SOpenDetail(itemID); } }