using vnxbqy.UI;
|
using UnityEngine.UI;
|
|
public class BagSelectCell : ILBehaviour
|
{
|
Button GotoButton;
|
Text title;
|
Image selectImg;
|
|
protected override void Awake()
|
{
|
title = proxy.GetWidgtEx<Text>("Txt_Name");
|
selectImg = proxy.GetWidgtEx<Image>("Img_Select");
|
GotoButton = proxy.GetWidgtEx<Button>("selectBtn");
|
}
|
|
public void Display(int funcID)
|
{
|
//小于10000 功能ID,大于10000为节日ID(10000+节日ID)
|
if (funcID < 10000)
|
{
|
title.text = Language.Get("BagTab_" + funcID);
|
|
selectImg.SetActiveIL(BagSelectModel.Instance.selectType == funcID);
|
|
GotoButton.SetListener(() =>
|
{
|
if (funcID == 0) return;
|
WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)BagSelectModel.Instance.bagTabs[funcID]);
|
|
});
|
}
|
else
|
{
|
var holidayID = funcID - 10000;
|
title.text = Language.Get("HolidayBagTab_" + holidayID);
|
|
selectImg.SetActiveIL(BagSelectModel.Instance.selectType == funcID);
|
|
GotoButton.SetListener(() =>
|
{
|
WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)BagSelectModel.Instance.holidayBagTabs[holidayID]);
|
|
});
|
}
|
}
|
|
|
}
|