using UnityEngine;
|
|
namespace vnxbqy.UI
|
{
|
public class CycleHallTabCell : CellView
|
{
|
CycleHallActModel model { get { return ModelCenter.Instance.GetModel<CycleHallActModel>(); } }
|
[SerializeField] TextEx txtName;
|
[SerializeField] ImageEx imgBg;
|
[SerializeField] ButtonEx btnTab;
|
[SerializeField] RedpointBehaviour redPoint;
|
|
public void Display(int id)
|
{
|
if (!CycleHallConfig.Has(id))
|
return;
|
CycleHallConfig config = CycleHallConfig.Get(id);
|
redPoint.redpointId = MainRedDot.CycleHallRepoint * 1000 + id;
|
imgBg.SetSprite(model.nowTabId == id ? "CycleHallTabBG_1" : "CycleHallTabBG_2");
|
imgBg.SetNativeSize();
|
txtName.text = config.TabName;
|
btnTab.SetListener(() =>
|
{
|
model.nowTabId = id;
|
});
|
}
|
}
|
}
|