using vnxbqy.UI;
|
|
public class RechargeGenerousGiftCell : ILBehaviour
|
{
|
ImageEx imgTitle;
|
ImageEx imgCellBG;
|
ButtonEx btnGo;
|
RedpointBehaviour redPoint;
|
|
protected override void Awake()
|
{
|
btnGo = proxy.GetWidgtEx<ButtonEx>("btnGo");
|
imgTitle = proxy.GetWidgtEx<ImageEx>("imgTitle");
|
imgCellBG = proxy.GetWidgtEx<ImageEx>("imgCellBG");
|
redPoint = proxy.GetWidgtEx<RedpointBehaviour>("redPoint");
|
}
|
|
public void Display(int winId)
|
{
|
if (!RechargeGenerousGiftModel.Instance.RechargeGenerousGiftInfoDict.TryGetValue(winId, out var info))
|
return;
|
redPoint.redpointId = info.RedPointID;
|
imgTitle.sprite = UILoader.LoadSprite(info.TitleFileName);
|
imgTitle.SetNativeSize();
|
imgCellBG.sprite = UILoader.LoadSprite(info.IconFileName);
|
btnGo.SetListener(() =>
|
{
|
WindowCenter.Instance.Open(info.WinName);
|
});
|
}
|
}
|