From 5aadeb406b3018724018143eecd990bab6f92463 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 30 Jul 2021 14:07:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E8=81=8A=E5=A4=A9=E3=80=91?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E6=A1=86=E6=A0=B9=E6=8D=AE=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E4=B8=8D=E5=90=8C=E7=9A=84=E9=A2=91?= =?UTF-8?q?=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/View/ChatTipView.lua | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/View/ChatTipView.lua b/Assets/ManagedResources/~Lua/View/ChatTipView.lua index 84549e36a6..6712ab4b96 100644 --- a/Assets/ManagedResources/~Lua/View/ChatTipView.lua +++ b/Assets/ManagedResources/~Lua/View/ChatTipView.lua @@ -31,11 +31,23 @@ end --绑定事件(用于子类重写) function ChatTipView:BindEvent() Util.AddClick(self.btn, function() - if self._ViewType == VIEW_TYPE.MAIN then - UIManager.OpenPanel(UIName.ChatPanel) - elseif self._ViewType == VIEW_TYPE.GUILD then - UIManager.OpenPanel(UIName.ChatPanel, 2, 2) + local jumpType = 1 + if self._ViewType == VIEW_TYPE.GUILD then + jumpType = 2 end + local tabIndex = 3 + if not self.channel then + tabIndex = 3 + elseif self.channel == CHAT_CHANNEL.SYSTEM then + tabIndex = 5 + elseif self.channel == CHAT_CHANNEL.FAMILY then + tabIndex = 2 + elseif self.channel == CHAT_CHANNEL.GLOBAL then + tabIndex = 3 + elseif self.channel == CHAT_CHANNEL.JUMP_SERVER then + tabIndex = 4 + end + UIManager.OpenPanel(UIName.ChatPanel, tabIndex, jumpType) end) Util.AddClick(self.redPackage,function() UIManager.OpenPanel(UIName.RedPacketPanel,3) @@ -101,8 +113,10 @@ function ChatTipView:RefreshChatShow() local chat = ChatManager.AnalysisGlobalChat(msg.chat.msg) content = string.format("[跨服]%s:%s", msg.chat.senderName, chat.content) end + self.channel = msg.channel end self.content.text = content + end -- 开始聊天数据刷新 From 4d8ab5dd7ee580dee5d074a03685b00c2b7c6445 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 30 Jul 2021 14:11:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E8=B7=A8=E6=9C=8D=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E3=80=91=E5=85=B3=E9=97=AD=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Chat/ChatPanel.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua b/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua index 595c98f4be..90197187f1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua @@ -538,19 +538,18 @@ function this.ChatItemAdapter(node, data, isShowTime) if data.senderId == PlayerManager.uid then lv.text = PlayerManager.level name.text = PracticeManager.SetNameColor(PlayerManager.nickName,PracticeManager.PracticeLevel) - if data.serverName and data.serverName ~= "" then - name.text = name.text.." "..data.serverName - end + -- if data.serverName and data.serverName ~= "" then + -- name.text = name.text.." "..data.serverName + -- end head.sprite = GetPlayerHeadSprite(this.spLoader, PlayerManager.head) headKuang.sprite = GetPlayerHeadFrameSprite(this.spLoader, HeadManager.GetCurFrameId()) title=PlayerManager.GetPlayerDesignation() else lv.text = data.senderlevel - if data.serverName and data.serverName ~= "" then - name.text = data.serverName .." "..data.senderName - else - name.text = data.senderName - end + name.text = data.senderName + -- if data.serverName and data.serverName ~= "" then + -- name.text = data.serverName .." "..data.senderName + -- end head.sprite = GetPlayerHeadSprite(this.spLoader, data.head) headKuang.sprite = GetPlayerHeadFrameSprite(this.spLoader, data.frame) title=data.userTitle