【山河社稷图优化】优化选关界面操作
parent
46247d8224
commit
8f2398c932
|
@ -375,6 +375,7 @@ function CarbonsPanel:BtnClick(id)
|
|||
end
|
||||
elseif id == FUNCTION_OPEN_TYPE.FIGHTLEVEL then
|
||||
if ActTimeCtrlManager.SingleFuncState(id) then
|
||||
FightLevelManager.curSelect = 0
|
||||
UIManager.OpenPanel(UIName.FightLevelChapterPanel)
|
||||
else
|
||||
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(id))
|
||||
|
|
|
@ -35,6 +35,7 @@ end
|
|||
function FightLevelChapterPanel:BindEvent()
|
||||
|
||||
Util.AddClick(self.btnBack, function()
|
||||
FightLevelManager.curSelect = 0
|
||||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(self.helpBtn, function()
|
||||
|
@ -104,15 +105,19 @@ function this.OnShowPanel()
|
|||
curChapterId = FightLevelManager.GetCurChapterId()
|
||||
local allData = FightLevelManager.GetChapterData()
|
||||
this.ScrollView:SetData(allData, function (index, go)
|
||||
this.SingleChapterDataShow(go, allData[index])
|
||||
this.SingleChapterDataShow(go, allData[index],index)
|
||||
end,true,true)
|
||||
if FightLevelManager.curSelect > 0 then
|
||||
this.ScrollView:SetShow(FightLevelManager.curSelect)
|
||||
else
|
||||
local curIndex = FightLevelManager.GetCurChapterId()
|
||||
this.ScrollView:SetShow(curIndex)
|
||||
end
|
||||
|
||||
-- 设置每日奖励显示
|
||||
this:SetDailyRewardShow()
|
||||
end
|
||||
function this.SingleChapterDataShow(go, data)
|
||||
function this.SingleChapterDataShow(go, data,index)
|
||||
|
||||
local playerParent = Util.GetGameObject(go, "playerParent")
|
||||
local cur = Util.GetGameObject(go, "cur")
|
||||
|
@ -172,6 +177,7 @@ function this.SingleChapterDataShow(go, data)
|
|||
if PlayerManager.level >= data.config.Open then
|
||||
if curChapterId >= data.chapterId then
|
||||
UIManager.OpenPanel(UIName.FightLevelSingleChapterPanel,data.chapterId)
|
||||
FightLevelManager.curSelect = index
|
||||
elseif curChapterId < data.chapterId then
|
||||
PopupTipPanel.ShowTip("通关上一章后解锁!")
|
||||
end
|
||||
|
@ -203,6 +209,7 @@ end
|
|||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FightLevelChapterPanel:OnClose()
|
||||
FightLevelManager.curSelect = 0
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
|
|
@ -47,6 +47,7 @@ function this.Initialize()
|
|||
allChapterData[config.Id] = singleChapterData
|
||||
end
|
||||
end
|
||||
this.curSelect = 0
|
||||
end
|
||||
--后端更新章节信息
|
||||
function this.UpdataChapterData(msg,_isShowChapterOpenPopup)
|
||||
|
|
Loading…
Reference in New Issue