diff --git a/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua b/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua index 37f31a7236..e24f9f297f 100644 --- a/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua @@ -115,10 +115,10 @@ function RewardBoxPanel:OnOpen(...) this.itemId = itemConfig[data[2]].Id end - this.scroll.gameObject:GetComponent("RectTransform").sizeDelta = data[1] and Vector2.New(940, 880) or Vector2.New(940, 1000) - this.scroll.gameObject:GetComponent("RectTransform").anchoredPosition = data[1] and Vector2.New(0, 415) or Vector2.New(0, 542.6) - this.ScrollView.gameObject:GetComponent("RectTransform").sizeDelta = data[1] and Vector2.New(940, 900) or Vector2.New(940, 1000) - Util.GetGameObject(this.gameObject,"bg/bg/huangtiao"):SetActive(not not data[1]) + this.scroll.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 880) or Vector2.New(940, 1000) + this.scroll.gameObject:GetComponent("RectTransform").anchoredPosition = #this.rewardGroup ~= 1 and Vector2.New(0, 415) or Vector2.New(0, 542.6) + this.ScrollView.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 900) or Vector2.New(940, 1000) + Util.GetGameObject(this.gameObject,"bg/bg/huangtiao"):SetActive(#this.rewardGroup ~= 1) end -- 打开,重新打开时回调