From 7c0726e5b9dea8a383f4e24fff7af7bfec8eb62d Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 6 Jan 2022 12:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A5=9E=E5=B0=86=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E3=80=91=E6=A0=B9=E6=8D=AE=E9=AD=82=E5=8D=B0=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BF=AE=E6=94=B9=E7=95=8C=E9=9D=A2=E7=9A=84=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Popup/RoleInfoPopup.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua index ad150da7e0..074285b030 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua @@ -22,6 +22,8 @@ function RoleInfoPopup:InitComponent() this.content = Util.GetGameObject(self.transform, "Panel/Scroll View/Viewport/Content"):GetComponent("RectTransform") this.backBtn = Util.GetGameObject(self.transform, "Panel/BackBtn") + this.bg = Util.GetGameObject(self.transform, "Panel/BG") + this.sc = Util.GetGameObject(self.transform, "Panel/Scroll View") this.roleInfo0 = Util.GetGameObject(self.transform, "Panel/Scroll View/Viewport/Content/RoleInfo0") this.head = Util.GetGameObject(this.roleInfo0, "Head") @@ -463,13 +465,25 @@ end function this.SoulPrintInfo() local curHeroSoulPrintDatas = {} - this.soulPrintInfo.gameObject:SetActive(#curHeroData.soulPrintList~=0) + + -- 没有魂印不显示 + if #curHeroData.soulPrintList==0 then + this.soulPrintInfo.gameObject:SetActive(false) + this.backBtn.transform.localPosition = Vector2.New(432.5, 590) + this.bg.transform.sizeDelta = Vector2.New(935, 1250) + this.sc.transform.sizeDelta = Vector2.New(935, 1132) + return + end + + this.soulPrintInfo.gameObject:SetActive(true) + this.backBtn.transform.localPosition = Vector2.New(432.5, 690) + this.bg.transform.sizeDelta = Vector2.New(935, 1450) + this.sc.transform.sizeDelta = Vector2.New(935, 1332) for key, value in pairs(soulPrintPreList) do if value then value:SetActive(false) end end - if #curHeroData.soulPrintList==0 then return end for i,v in pairs(curHeroData.soulPrintList) do --生成预设 if not soulPrintPreList[i] then