diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardTalismanSingleShowPopup2.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardTalismanSingleShowPopup2.lua index 3b0f48784a..f1d952528b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardTalismanSingleShowPopup2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardTalismanSingleShowPopup2.lua @@ -206,7 +206,6 @@ function RewardTalismanSingleShowPopup2:SetBtns() self.btnSwitch:SetActive(self.openType == 4) self.btnUpgrade:SetActive(self.openType == 2) self.btnUpstar:SetActive(self.openType == 2) - self.mid:GetComponent("LayoutElement").minHeight = not self.isShowGet and 850 or 250 if self.equipData and self.equipData ~= 0 then isGongMing = HarmonyManager.IsInfo(self.equipData.upHeroDid) @@ -276,9 +275,6 @@ function RewardTalismanSingleShowPopup2:OnShow() self.treeLevel.text = string.format("[神应等级:%s/%s]",self.equipData.treeLv,self.equipData.maxTreeLv) if (self.equipData.treeLv < 1 and SacredTreeManager.CulAttri(self.equipData) < 1) or self.openType == 1 then self.treeAttri:SetActive(false) - if not self.isShowGet then - self.mid:GetComponent("LayoutElement").minHeight = 450 - end else self.treeAttri:SetActive(true) self:SetPropertyShow2(treeInfo,self.TreeAttriList,self.treeGrid,self.TreeAttriList2) @@ -288,9 +284,6 @@ function RewardTalismanSingleShowPopup2:OnShow() if self.equipData.upHeroDid == "" or self.equipData.upHeroDid == "0" then self.baseMaster:SetActive(false) self.refineMaster:SetActive(false) - if not self.isShowGet then - self.mid:GetComponent("LayoutElement").minHeight = 250 - end else --强化共鸣 self:GongMingSetData(1,self.BaseMasterList,self.baseMasterGrid,self.baseMasterName,self.baseMaster) @@ -330,6 +323,16 @@ function RewardTalismanSingleShowPopup2:OnShow() ForceRebuildLayout(self.midBar.transform) ForceRebuildLayout(self.midBar.transform) + if self.isShowGet then + self.mid:GetComponent("LayoutElement").minHeight = 850 + else + local sizeDelta = GetPreferredHeight(self.midBar.transform) + if sizeDelta >= 850 then + self.mid:GetComponent("LayoutElement").minHeight = 850 + else + self.mid:GetComponent("LayoutElement").minHeight = sizeDelta + end + end if self.func then self.func() end @@ -486,9 +489,6 @@ function RewardTalismanSingleShowPopup2:GongMingSetData(curTabIndex,proPreList,g end if curJewelResonanceConfig.SortId < 1 then go.gameObject:SetActive(false) - if not self.isShowGet then - self.mid:GetComponent("LayoutElement").minHeight = self.mid:GetComponent("LayoutElement").minHeight - 100 - end return end go.gameObject:SetActive(true)