public void InitWindow(List <SMsgChat_SC> list, SelectedChatTargetDelegate callBack) { m_Delegate = callBack; list.ApplyAllItem(p => { this.CreateChatItem(p); }); Table.Reposition(); StartCoroutine("SetDragAmount"); }
//void Awake() //{ // Button_Select.SetCallBackFuntion(BeSelect, null); //} public void Init(int channel, int actorID, string name, int vipLevel, string chat, int chatType, int fTeamID, SelectedChatTargetDelegate selectedChatTargetDelegate) { this.uiChatActorID = actorID; this.friendTeamID = fTeamID; Swith_CannelIcon.ChangeSprite(channel); if (vipLevel > 0) { Swith_VipIcon.ChangeSprite(vipLevel); Swith_VipIcon.gameObject.SetActive(true); } else { Swith_VipIcon.gameObject.SetActive(false); } Label_chat.text = chat; sChatName = name; this.m_SelectedDelegate = selectedChatTargetDelegate; var playerData = PlayerManager.Instance.FindHeroDataModel(); if (actorID != playerData.ActorID) { if (m_SelectedDelegate != null) { Button_Select.SetCallBackFuntion(BeSelect, null); } //Label_chat.color = ChatPanelUIManager.ColorOther; } else { //Label_chat.color = ChatPanelUIManager.ColorMy; } if (Button_Join != null) { if (chatType == 1) { Button_Join.gameObject.SetActive(true); Button_Join.SetCallBackFuntion(OnJoinHandle, null); } else { Button_Join.gameObject.SetActive(false); } } }