From bacf88be86f559837ea2c7c8d805ac05c5ad3a37 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 25 Feb 2021 21:42:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=EF=BC=8C=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Guild/GuildInfoPopup.prefab | 22 +++++----- .../~Lua/Modules/Guild/GuildInfoPopup.lua | 1 + .../Modules/Guild/GuildMemberInfoPopup.lua | 4 +- .../~Lua/Modules/Login/NoticePopup.lua | 6 ++- .../~Lua/Modules/Mail/MailManager.lua | 42 ++++++++++--------- 5 files changed, 40 insertions(+), 35 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Guild/GuildInfoPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Guild/GuildInfoPopup.prefab index affc409b55..92934698e3 100644 --- a/Assets/ManagedResources/Prefabs/UI/Guild/GuildInfoPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Guild/GuildInfoPopup.prefab @@ -630,7 +630,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &565426657 RectTransform: m_ObjectHideFlags: 0 @@ -1716,7 +1716,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1808648954 RectTransform: m_ObjectHideFlags: 0 @@ -2430,7 +2430,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 220, y: -30} + m_AnchoredPosition: {x: 489, y: -30} m_SizeDelta: {x: 360, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &7831156585591067873 @@ -5914,7 +5914,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 86, y: -30} + m_AnchoredPosition: {x: 296, y: -30} m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &1254031054342702809 @@ -7356,7 +7356,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 43, y: -30} + m_AnchoredPosition: {x: 253, y: -30} m_SizeDelta: {x: 46, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7440753204596349393 @@ -9009,7 +9009,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 186.9, y: -30} + m_AnchoredPosition: {x: 396.9, y: -30} m_SizeDelta: {x: 333.8, y: 60} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &953930339862039810 @@ -9354,7 +9354,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -30} + m_AnchoredPosition: {x: 230, y: -30} m_SizeDelta: {x: 59, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &7460730661891921754 @@ -9666,8 +9666,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 263.2, y: -2.9} - m_SizeDelta: {x: 273.6, y: 50} + m_AnchoredPosition: {x: 257, y: -2.9} + m_SizeDelta: {x: 261.2, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6262845534552740248 CanvasRenderer: @@ -9704,7 +9704,7 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 2 m_MaxSize: 40 - m_Alignment: 4 + m_Alignment: 5 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 1 @@ -9982,7 +9982,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -30} + m_AnchoredPosition: {x: 230, y: -30} m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &928783852799262530 diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua index 5a8a1fe518..c1de7683e7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua @@ -553,6 +553,7 @@ end function this.LogItemAdapter(item, data) local nameText = Util.GetGameObject(item, "name") local statusText = Util.GetGameObject(item, "state") + LogGreen("data.info:"..data.info) local logStr = string.split(data.info,"|") nameText:GetComponent("Text").text = logStr[GetCurLanguage()+1] or logStr[1] statusText:GetComponent("Text").text = GetDeltaTimeStr(data.time) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMemberInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMemberInfoPopup.lua index 0eb91a3fc7..2e8f93c07c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMemberInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMemberInfoPopup.lua @@ -58,7 +58,6 @@ function GuildMemberInfoPopup:InitComponent() this.memHead = Util.GetGameObject(self.transform, "tipImage/panel/info/head") this.memName = Util.GetGameObject(self.transform, "tipImage/panel/info/name"):GetComponent("Text") - this.memProfessTip = Util.GetGameObject(self.transform, "tipImage/panel/info/professName"):GetComponent("Text") this.memProfess = Util.GetGameObject(self.transform, "tipImage/panel/info/profess"):GetComponent("Text") this.addFriendBtn = Util.GetGameObject(self.transform, "tipImage/panel/info/btnAdd") this.addFriendBtnText = Util.GetGameObject(this.addFriendBtn, "text"):GetComponent("Text") @@ -192,8 +191,7 @@ end -- 刷新基础信息显示 function this.RefreshPlayerInfo() this.memName.text = this._MemData.userName - this.memProfessTip.text = Language[10935] - this.memProfess.text = GUILD_GRANT_STR[this._MemData.position] + this.memProfess.text = Language[10935]..GUILD_GRANT_STR[this._MemData.position] -- 头像 if not _PlayerHead then _PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua b/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua index 9cddb224a7..c62f31150b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua @@ -68,8 +68,10 @@ function this.GetNotice(str) --Log("data.parms.content:"..data.parms.content) if data.parms then - this.TitleText.text=data.parms.title - this.ContentText.text=string.gsub(data.parms.content, "\\n", "\n") + local titleStr = string.split(data.parms.title,"|") + this.TitleText.text =titleStr[GetCurLanguage()+1] or titleStr[1] + local contentStr = string.split(string.gsub(data.parms.content, "\\n", "\n"),"|") + this.ContentText.text = contentStr[GetCurLanguage()+1] or contentStr[1] else this.TitleText.text=Language[11147] this.ContentText.text=Language[11148] diff --git a/Assets/ManagedResources/~Lua/Modules/Mail/MailManager.lua b/Assets/ManagedResources/~Lua/Modules/Mail/MailManager.lua index 0753655add..0cacc90bba 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mail/MailManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mail/MailManager.lua @@ -32,6 +32,7 @@ function this.UpdateMialData(_mial) local content = string.split(_mial.content,"|") singleMail.content = content[GetCurLanguage()+1] or content[1]--详情 singleMail.content = this.GetStringByStringformat(singleMail.content) + LogGreen("singleMail.content:"..singleMail.content) singleMail.mailItem = _mial.mailItem--附件 奖励 singleMail.sendTime = _mial.sendTime-- singleMail.effectiveTime = _mial.effectiveTime--秒 0:永久有效 @@ -44,26 +45,29 @@ end function this.GetStringByStringformat(inputStr) local msgStr = string.split(inputStr,"#") LogGreen("inputStr:"..inputStr) - for i = 2, #msgStr do - --1 需要翻译 - local oneStr = string.sub(msgStr[i],1,1) - if tonumber(oneStr) == 1 then - msgStr[i] = tostring(string.sub(msgStr[i],2)) - msgStr[i] = GetLanguageStrById(msgStr[i]) - else - msgStr[i] = tostring(string.sub(msgStr[i],2)) - end + if #msgStr == 1 then + return GetLanguageStrById(msgStr[1]) + end + for i = 2, #msgStr do + --1 需要翻译 + local oneStr = string.sub(msgStr[i],1,1) + if tonumber(oneStr) == 1 then + msgStr[i] = tostring(string.sub(msgStr[i],2)) + msgStr[i] = GetLanguageStrById(msgStr[i]) + else + msgStr[i] = tostring(string.sub(msgStr[i],2)) end - local returnStr = string.format( - GetLanguageStrById(msgStr[1]), - tostring(msgStr[2]), - tostring(msgStr[3]), - tostring(msgStr[4]), - tostring(msgStr[5]), - tostring(msgStr[6]) - ) - LogPink("returnStr:"..returnStr) - return returnStr + end + local returnStr = string.format( + GetLanguageStrById(msgStr[1]), + tostring(msgStr[2]), + tostring(msgStr[3]), + tostring(msgStr[4]), + tostring(msgStr[5]), + tostring(msgStr[6]) + ) + LogPink("returnStr:"..returnStr) + return returnStr end --更新邮件状态