diff --git a/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintHandBook.lua b/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintHandBook.lua index 79346535c3..ef45e4747f 100644 --- a/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintHandBook.lua +++ b/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintHandBook.lua @@ -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 = {}