You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
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<Image>();
|
|
txtHeader = trf.Find("txtHeader").GetComponent<TextMeshProUGUI>();
|
|
txtTitle = trf.Find("txtTitle").GetComponent<TextMeshProUGUI>();
|
|
txtDate = trf.Find("txtDate").GetComponent<TextMeshProUGUI>();
|
|
btnView = trf.Find("btnView").GetComponent<ButtonIV>();
|
|
btnView.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = LocalizationText.GetText("all_see");
|
|
}
|
|
|
|
public override void Localize()
|
|
{
|
|
btnView.transform.GetChild(0).GetComponent<TextMeshProUGUI>().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);
|
|
}
|
|
|
|
}
|