From df76a49401f291ba7f8adbe5d7406b38539b8a04 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Tue, 27 Apr 2021 14:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A2=8E=E7=89=87=E8=87=AA=E9=80=89?= =?UTF-8?q?=E7=AE=B1=E3=80=91=E9=80=9A=E8=BF=87=E9=81=93=E5=85=B7=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E8=B7=B3=E8=BD=AC=E5=88=AB=E7=9A=84=E5=9C=B0=E6=96=B9?= =?UTF-8?q?=EF=BC=8C=E8=BF=94=E5=9B=9E=E5=90=8E=E9=80=89=E4=B8=AD=E6=A0=87?= =?UTF-8?q?=E8=AF=86=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/RewardBox/RewardBoxPanel.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua b/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua index 40677f96cd..dc4e494701 100644 --- a/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RewardBox/RewardBoxPanel.lua @@ -103,6 +103,16 @@ function RewardBoxPanel:OnOpen(...) this.scroll.gameObject:GetComponent("RectTransform").anchoredPosition = #this.rewardGroup ~= 1 and Vector2.New(0, 376) or Vector2.New(0, 444) this.ScrollView.gameObject:GetComponent("RectTransform").sizeDelta = #this.rewardGroup ~= 1 and Vector2.New(940, 830) or Vector2.New(940, 900) +end + +-- 打开,重新打开时回调 +function RewardBoxPanel:OnShow() + this.name.text = GetLanguageStrById(itemConfig[this.itemId].Name) + itemList={} + curId = nil + tagNum = 1 + + --刷新按钮亮光 this.selectList ={} for n = 1, this.selectBar.transform.childCount-1 do--设置当前页签 table.insert(this.selectList,this.selectBar.transform:GetChild(n).gameObject) @@ -121,14 +131,6 @@ function RewardBoxPanel:OnOpen(...) end) end -end - --- 打开,重新打开时回调 -function RewardBoxPanel:OnShow() - this.name.text = GetLanguageStrById(itemConfig[this.itemId].Name) - itemList={} - curId = nil - tagNum = 1 self:RefreshData() end