Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

gaoxin 2020-10-12 17:10:39 +08:00
commit 8978b6c906
2 changed files with 18 additions and 11 deletions

View File

@ -4,7 +4,7 @@ local this = DynamicActivityPanel
-- Tab管理器
local TabBox = require("Modules/Common/TabBox")
local GlobalActConfig = ConfigManager.GetConfig(ConfigName.GlobalActivity)
this._CurPageIndex =1
local _CurPageIndex =1
local orginLayer
local tabs = {
[1] = { --破阵诛仙
@ -123,16 +123,17 @@ end
--界面打开时调用(用于子类重写)
function DynamicActivityPanel:OnOpen(chooseIndex)
-- 初始化tab数据
-- 初始化tab数据
LogBlue("当前选中页签1"..chooseIndex)
_CurPageIndex = chooseIndex or 1
this.PageTabCtrl:Init(this.tabbox, tabs)
this._CurPageIndex = chooseIndex or 1
end
-- 打开,重新打开时回调
function DynamicActivityPanel:OnShow()
if this._CurPageIndex then
this.PageTabCtrl:ChangeTab(this._CurPageIndex)
if _CurPageIndex then
LogBlue("当前选中页签:".._CurPageIndex)
this.PageTabCtrl:ChangeTab(_CurPageIndex)
end
end
@ -180,7 +181,7 @@ end
-- tab改变事件
function this.OnPageTabChange(index)
this._CurPageIndex = index
_CurPageIndex = index
for i = 1, #this.PageList do
if this.PageList[i] then
this.PageList[i]:OnHide()
@ -218,9 +219,9 @@ end
--界面关闭时调用(用于子类重写)
function DynamicActivityPanel:OnClose()
if this._CurPageIndex then
this.PageList[_PageInfo[this._CurPageIndex]]:OnHide()
this.PageList[_PageInfo[this._CurPageIndex]].gameObject:SetActive(false)
if _CurPageIndex then
this.PageList[_PageInfo[_CurPageIndex]]:OnHide()
this.PageList[_PageInfo[_CurPageIndex]].gameObject:SetActive(false)
end
end
--界面销毁时调用(用于子类重写)

View File

@ -826,7 +826,13 @@ function this:BindEvent()
end)
--破阵诛仙、限时召唤、乾坤宝盒
Util.AddClick(this.btnDynamicActivity, function ()
UIManager.OpenPanel(UIName.DynamicActivityPanel)
local dynamicAct = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct)
local curindex = 1
if dynamicAct then
curindex = GlobalActConfig[dynamicAct].ShowArt
end
LogBlue("当前选中页签0"..curindex)
UIManager.OpenPanel(UIName.DynamicActivityPanel,curindex)
end)
--神将合成、神将置换