魂印修改提交

dev_chengFeng
jiaoyangna 2022-02-18 15:08:45 +08:00
parent a76616df31
commit 1bd0fe5562
1 changed files with 15 additions and 10 deletions

View File

@ -43,17 +43,15 @@ function SoulPrintHandBook:BindEvent()
for i = 1, 4 do
Util.AddClick(tabs[i], function()
if (curIndex == i) then
this.selectBtn:SetActive(false)
else
this.selectBtn:SetActive(true)
end
curIndex = i
this.selectBtn.transform.localPosition = tabs[i].transform.localPosition
if (not this.selectBtn.activeSelf) then
curIndex = 0--没有选定筛选按钮显示全部魂印
-- this.selectBtn:SetActive(false)
-- curIndex = 0
return
end
curIndex = i
this.OnRefresh(curIndex)
this.selectBtnText.text = Util.GetGameObject(tabs[i].transform, "Text"):GetComponent("Text").text
this:SetSelect()
end)
end
@ -88,9 +86,16 @@ end
function SoulPrintHandBook:OnShow()
this.GetAllData()
curIndex=0
curIndex=1
this.OnRefresh(curIndex)
this.SetBottomBarIsActive()
this:SetSelect()
end
function SoulPrintHandBook:SetSelect()
this.selectBtn:SetActive(true)
this.selectBtn.transform.localPosition = tabs[curIndex].transform.localPosition
this.selectBtnText.text = Util.GetGameObject(tabs[curIndex].transform, "Text"):GetComponent("Text").text
end
function this.GetAllData()
allSoulPrintData = {}