【碎片自选箱】通过道具详情跳转别的地方,返回后选中标识居中

dev_chengFeng
ZhangBiao 2021-04-27 14:33:25 +08:00
parent eb7d89578a
commit df76a49401
1 changed files with 10 additions and 8 deletions

View File

@ -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