| | |
| | | [SerializeField] Button m_NewInfoBtn;
|
| | | [SerializeField] Button m_LockAreaBtn;
|
| | | [SerializeField] Image m_LockAreaCheck;
|
| | | [SerializeField, Header("显示区域大小")] float m_ContentDisplaySize = 630;
|
| | | [SerializeField] RectTransform m_ContainerDisplay;
|
| | | [SerializeField] RectTransform m_ContainerPrivateChatRemind;
|
| | | [SerializeField] RectTransform m_Scroller;
|
| | |
|
| | | [SerializeField, Header("锁定当前区域比例"), Range(0, 1)] float m_Percent = 0.3f;
|
| | |
|
| | | [SerializeField] ChatPlayerMineCell m_ChatMineCell;
|
| | |
| | | }
|
| | | set
|
| | | {
|
| | | bool isChange = m_ChatType != value;
|
| | | ResetNewInfo();
|
| | | m_ChatType = value;
|
| | | DisplayChatContent();
|
| | | if (isChange)
|
| | | {
|
| | | DisplayChatRemind();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | private void OnEnable()
|
| | | {
|
| | | DisplayChatContent();
|
| | | DisplayChatRemind();
|
| | | ChatCtrl.OnRefreshChat += OnRefreshChat;
|
| | | ChatCtrl.OnRefreshPteChat += OnRefreshPteChat;
|
| | | ChatCtrl.OnRefreshSelf += OnRefreshSelf;
|
| | |
| | | if (m_ChatType == ChatInfoType.Friend)
|
| | | {
|
| | | DisplayChatContent();
|
| | | DisplayChatRemind();
|
| | | JumpPteChatBottom();
|
| | | }
|
| | | }
|
| | |
| | | m_LockAreaBtn.gameObject.SetActive(m_ChatType != ChatInfoType.Friend);
|
| | | }
|
| | |
|
| | | private void DisplayChatRemind()
|
| | | {
|
| | | if (m_ContainerPrivateChatRemind != null)
|
| | | {
|
| | | bool requireRemind = false;
|
| | | if (m_ChatType == ChatInfoType.Friend)
|
| | | {
|
| | | requireRemind = true;
|
| | | }
|
| | | var displayAreaHeight = m_ContainerDisplay.rect.height;
|
| | | m_ContainerPrivateChatRemind.gameObject.SetActive(requireRemind);
|
| | | if (requireRemind)
|
| | | {
|
| | | displayAreaHeight = m_ContainerDisplay.rect.height - m_ContainerPrivateChatRemind.rect.height;
|
| | | }
|
| | | m_Scroller.sizeDelta = m_Scroller.sizeDelta.SetY(displayAreaHeight);
|
| | | }
|
| | | }
|
| | |
|
| | | float KeepArea()
|
| | | {
|
| | | if (m_ChatContentControl.GetNumberOfCells(m_ChatContentControl.m_Scorller) == ChatCtrl.Inst.CHAT_INFO_CNT)
|