using UnityEngine; namespace vnxbqy.UI { public class ChatFaceTabCell : CellView { [SerializeField] ButtonEx btnFaceTab; [SerializeField] ImageEx imgFaceTab; [SerializeField] TextEx txtFaceTab; int emojiPackID; PhantasmPavilionModel model { get { return ModelCenter.Instance.GetModel(); } } public void Display(int emojiPackID) { this.emojiPackID = emojiPackID; if (!EmojiPackConfig.Has(emojiPackID)) return; EmojiPackConfig config = EmojiPackConfig.Get(emojiPackID); txtFaceTab.text = config.Name; imgFaceTab.SetSprite(model.selectEmojiPackID == index ? "Chat_SelectBtn" : "Chat_UnSelectBtn"); btnFaceTab.SetListener(OnTabClick); } private void OnTabClick() { model.selectEmojiPackID = emojiPackID; } } }