| using System;  | 
| using UnityEngine;  | 
|   | 
| public class PhantasmPavilionTabCell : CellView  | 
| {  | 
|     [SerializeField] ButtonEx btnTab;  | 
|     [SerializeField] TextEx txtTab;  | 
|     [SerializeField] ImageEx imgChoose;  | 
|     [SerializeField] RedpointBehaviour redpointBehaviour;  | 
|     int iIndex;  | 
|   | 
|     public void Display(int index)  | 
|     {  | 
|         this.iIndex = index;  | 
|         redpointBehaviour.redpointId = MainRedDot.PhantasmPavilionRepoint * 10 + index + 1;  | 
|         txtTab.text = Language.Get(StringUtility.Contact("PhantasmPavilionTab", index));  | 
|         imgChoose.SetActive(index == (int)PhantasmPavilionModel.Instance.selectTab);  | 
|         btnTab.SetListener(OnTabClick);  | 
|     }  | 
|   | 
|     private void OnTabClick()  | 
|     {  | 
|         if (!Enum.IsDefined(typeof(PhantasmPavilionTab), iIndex))  | 
|             return;  | 
|         PhantasmPavilionTab tab = (PhantasmPavilionTab)iIndex;  | 
|         if (tab == PhantasmPavilionModel.Instance.selectTab)  | 
|             return;  | 
|         PhantasmPavilionModel.Instance.selectTab = tab;  | 
|     }  | 
| } |