修改每日挑战战斗界面的任务入口

This commit is contained in:
xiekaidong 2023-06-13 15:24:48 +08:00
parent 81f68ec173
commit ee6a38b813
2 changed files with 14 additions and 5 deletions

View File

@ -119,12 +119,7 @@ function BattlePauseUI:refreshDailyChallengeNode()
ModuleManager.TipsManager:showDescTips(buffDescs[i] or GConst.EMPTY_STRING, obj)
end)
end
uiMap["battle_pause_ui.daily_challenge_node.task"]:addClickListener(function()
ModuleManager.DailyChallengeManager:showBattleTaskUI()
end)
uiMap["battle_pause_ui.daily_challenge_node.buff_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.BUFF_DESC))
uiMap["battle_pause_ui.daily_challenge_node.task_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME))
end
return BattlePauseUI

View File

@ -75,6 +75,7 @@ function BattleUI:_display()
self:initCommonSkillDescTips()
self:initBossEnterAni()
self:initCounterAttack()
self:refreshTaskBtn()
end
function BattleUI:_addListeners()
@ -1681,6 +1682,19 @@ function BattleUI:refreshWave(wave)
GFunc.centerImgAndTx(icon, desc, 10)
end
function BattleUI:refreshTaskBtn()
local uiMap = self.root:genAllChildren()
local taskBtn = uiMap["battle_ui.top_node.task_btn"]
if self.battleController.battleType == GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then
taskBtn:setActive(true)
taskBtn:addClickListener(function()
ModuleManager.DailyChallengeManager:showBattleTaskUI()
end)
else
taskBtn:setActive(false)
end
end
function BattleUI:getSfxLine(index, func)
self.hidingAllSfxLine = false