TCX_LongZhu
DESKTOP-MMO982B\User 2026-05-09 16:00:55 +08:00
parent 90e1c0fcc2
commit a9d84c273b
1 changed files with 12 additions and 11 deletions

View File

@ -23,11 +23,11 @@ local tabs = {
-- default = "UI_hz_zhonghe01_83", lock = "UI_hz_zhonghe01_83", select = "UI_hz_zhonghe01_82",tabName = "装备篇",
-- rpType = RedPointType.Equip_Fetter,funcType = FUNCTION_OPEN_TYPE.COMPOUND,bg = "t_tianshumijuan_shengjiangditu",zi = "t_tianshumijuan_zhuangbeipian_zi_zh",
-- },
[5] = { --神兵
[4] = { --神兵
default = "UI_hz_zhonghe01_83", lock = "UI_hz_zhonghe01_83", select = "UI_hz_zhonghe01_82",tabName = "超级武器篇",
rpType = RedPointType.Weapon_Fetter,funcType = FUNCTION_OPEN_TYPE.POKEMON,bg = "GSX116",zi = "GodWeaponAtlas_handbook_title_zh",
},
[6] = { --法宝
[5] = { --法宝
default = "UI_hz_zhonghe01_83",
lock = "UI_hz_zhonghe01_83",
select = "UI_hz_zhonghe01_82",
@ -38,7 +38,7 @@ local tabs = {
,
zi = "GodWeaponAtlas_handbook_title_zh",
},
[7] = { --法相
[6] = { --法相
default = "UI_hz_zhonghe01_83",
lock = "UI_hz_zhonghe01_83",
select = "UI_hz_zhonghe01_82",
@ -49,7 +49,7 @@ local tabs = {
,
zi = "GodWeaponAtlas_handbook_title_zh",
},
[8] = { --身外化身
[7] = { --身外化身
default = "UI_hz_zhonghe01_83",
lock = "UI_hz_zhonghe01_83",
select = "UI_hz_zhonghe01_82",
@ -90,9 +90,14 @@ function TianShuMiJuanMainPanel:InitComponent()
self.empty = Util.GetGameObject(self.gameObject,"bg/NoneImage")
self.Image = Util.GetGameObject(self.gameObject,"bg/static/Image (1)"):GetComponent("RectTransform")
self.TabCtrl = TabBox.New()
self.TabCtrl:SetTabAdapter(self.SetTabAdapter)
self.TabCtrl:SetTabIsLockCheck(self.TabIsLockCheck)
self.TabCtrl:SetChangeTabCallBack(self.SetChangeTabCallBack)
end
function TianShuMiJuanMainPanel.SetTabAdapter(newTab, index, status)
LogError(""..index)
local img = Util.GetGameObject(newTab.gameObject,"img"):GetComponent("Image")
local redpot = Util.GetGameObject(newTab.gameObject,"redpot")
local tabName = Util.GetGameObject(newTab.gameObject,"Text"):GetComponent("Text")
@ -155,10 +160,6 @@ function TianShuMiJuanMainPanel:BindEvent()
curData = self:ShaiData()
self:RefreshData(curData)
end)
self.tabBox = TabBox.New()
self.tabBox:SetTabAdapter(self.SetTabAdapter)
self.tabBox:SetTabIsLockCheck(self.TabIsLockCheck)
self.tabBox:SetChangeTabCallBack(self.SetChangeTabCallBack)
end
--添加事件监听(用于子类重写)
@ -177,7 +178,7 @@ function TianShuMiJuanMainPanel:OnOpen(...)
curPage = args[1] or 1
curShai = 0
self.shaiText.text = status[curShai]
self.tabBox:Init(self.tabbox.gameObject, tabs, curPage)
self.TabCtrl:Init(self.tabbox.gameObject, tabs, curPage)
end
-- 打开,重新打开时回调