Example #1
0
    void Show(CellPhoneShowType cellPhoneShowType)
    {
        curShowType = cellPhoneShowType;
        switch (cellPhoneShowType)
        {
        case CellPhoneShowType.Message:
            ShowAllMessageWetalkFriend();
            break;

        case CellPhoneShowType.FriendList:
            ShowFriendList();
            break;

        case CellPhoneShowType.Chat:
            ShowChat(curSinglePeopleChatData);
            break;
            //case CellPhoneShowType.Invite:
            //    ShowFriendList();
            //    break;
        }
    }
Example #2
0
    /// <summary>
    /// 显示聊天页面
    /// </summary>
    public void ShowChat(SinglePeopleChatData singlePeopleChatData)
    {
        curShowType = CellPhoneShowType.Chat;
        ClearChatGrid();
        trans_chat.gameObject.SetActive(true);
        People people = RoleManager.Instance.FindPeopleWithOnlyId(singlePeopleChatData.Belong);

        txt_chatLabel.SetText(people.protoData.Name);
        for (int i = 0; i < singlePeopleChatData.ChatDataList.Count; i++)
        {
            allChatItemViewList.Add(PanelManager.Instance.OpenSingle <SingleChatItemView>(trans_chatGrid, singlePeopleChatData.ChatDataList[i]));
        }
        curSinglePeopleChatData = singlePeopleChatData;
        SocializationManager.Instance.CheckedChat(singlePeopleChatData);
        //自动定位
        if (rectTrans_chatScroll.sizeDelta.y < trans_chatGrid.GetComponent <RectTransform>().sizeDelta.y)
        {
            float offset = trans_chatGrid.GetComponent <RectTransform>().sizeDelta.y - rectTrans_chatScroll.sizeDelta.y;
            trans_chatGrid.GetComponent <RectTransform>().anchoredPosition = new Vector2(trans_chatGrid.localPosition.x, offset);
        }
        OnCheckedRedPoint(curSinglePeopleChatData);
    }