显示活动选中修改 替换出包图片资源
parent
6fb7e80803
commit
d452d76d05
Binary file not shown.
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 472 KiB |
Binary file not shown.
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 60 KiB |
|
@ -193,11 +193,16 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function ExpertPanel:OnShow()
|
||||
LogGreen("defaultIndex 1 "..defaultIndex)
|
||||
if defaultIndex > 0 then
|
||||
self:SetOpenActiveBtn()
|
||||
else
|
||||
defaultIndex = self:SetOpenActiveBtn()
|
||||
|
||||
LogGreen("defaultIndex 2 "..defaultIndex)
|
||||
defaultIndex = self:GetPriorityIndex(defaultIndex)
|
||||
|
||||
LogGreen("defaultIndex 3 "..defaultIndex)
|
||||
end
|
||||
self:RefreshActivityShow()
|
||||
if defaultIndex > 0 then
|
||||
|
@ -499,7 +504,7 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
local isActive =not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.PatFace)
|
||||
if isActive and patFaceAllData and #patFaceAllData > 0 then
|
||||
tabBtns[ExperType.PatFace]:SetActive(true)
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > ExperType.PatFace then
|
||||
defaultIndex = ExperType.PatFace
|
||||
end
|
||||
else
|
||||
|
@ -518,7 +523,7 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
if shopItemData and diffMonsterBuyData == nil then
|
||||
diffMonsterBuyData = v
|
||||
tabBtns[ExperType.DiffMonster]:SetActive(true)
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > ExperType.DiffMonster then
|
||||
defaultIndex = ExperType.DiffMonster
|
||||
end
|
||||
end
|
||||
|
@ -537,7 +542,7 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
tabBtns[ExperType.WeekCard]:SetActive(false)
|
||||
else
|
||||
tabBtns[ExperType.WeekCard]:SetActive(true)
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > ExperType.WeekCard then
|
||||
defaultIndex = ExperType.WeekCard
|
||||
end
|
||||
end
|
||||
|
@ -547,7 +552,7 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
--福星高照
|
||||
local curActiveData =not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LuckyCat)
|
||||
if curActiveData then
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > 5 then
|
||||
defaultIndex = 5
|
||||
end
|
||||
tabBtns[5]:SetActive(true)
|
||||
|
@ -566,9 +571,10 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
--end
|
||||
--所有达人
|
||||
for i, v in pairs(numExChange) do
|
||||
LogGreen("v "..v)
|
||||
local curActiveData = ActivityGiftManager.GetActivityTypeInfo(v)
|
||||
if curActiveData then
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > i then
|
||||
defaultIndex = i
|
||||
end
|
||||
tabBtns[i]:SetActive(true)
|
||||
|
@ -583,7 +589,7 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
tabBtns[ExperType.ExChange]:SetActive(false)
|
||||
else
|
||||
tabBtns[ExperType.ExChange]:SetActive(true)
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > ExperType.ExChange then
|
||||
defaultIndex = ExperType.ExChange
|
||||
end
|
||||
end
|
||||
|
@ -600,7 +606,7 @@ function ExpertPanel:SetOpenActiveBtn()
|
|||
--限时礼包
|
||||
if OperatingManager.IsGiftBuyActive() then
|
||||
tabBtns[ExperType.GiftBuy]:SetActive(true)
|
||||
if defaultIndex == 0 then
|
||||
if defaultIndex == 0 or defaultIndex > ExperType.GiftBuy then
|
||||
defaultIndex = ExperType.GiftBuy
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue