显示bug修复

This commit is contained in:
xiekaidong 2023-09-12 20:26:49 +08:00
parent cc9f3a9137
commit b20644f4cb
4 changed files with 9 additions and 9 deletions

View File

@ -211,8 +211,8 @@ function BattleRuneResultUI:refreshTaskNode()
local condition = chapterCondition[newIndex]
if condition then
objs.cell:getBaseObject():setActive(true)
local taskNum = taskProgress[index] and taskProgress[index].progress
local desc = self.runeData:getConditionDesc(condition, taskNum)
local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress
local desc = self.runeData:getConditionDesc(condition)
local over = false
if taskProgress[newIndex] then
local info = taskProgress[newIndex]

View File

@ -510,14 +510,15 @@ function BattleUI:refreshTaskNode()
local atlast, iconName = runeData:getConditionIcon(condition)
local taskNum = condition[3] or 0
Logger.printTable(taskProgress)
local over = false
if taskProgress[newIndex] then
taskNum = taskProgress[newIndex].totalProgress - taskProgress[newIndex].progress
if taskNum < 0 then
taskNum = 0
end
over = taskProgress[newIndex].over
end
cell:refresh(atlast, iconName, taskNum)
cell:refresh(atlast, iconName, taskNum, over)
cell:addClickListener(function()
ModuleManager.DungeonRuneManager:showTaskUI(self.battleController.chapterId)
end)

View File

@ -2,18 +2,17 @@ local BattleTaskCell = class("BattleTaskCell", BaseCell)
local BG = {"common_board_131", "common_board_132"} -- 紫绿
function BattleTaskCell:refresh(iconAtlas, iconName, taskNum)
function BattleTaskCell:refresh(iconAtlas, iconName, taskNum, over)
local uiMap = self:getUIMap()
local bg = uiMap["battle_task_cell.bg"]
local icon = uiMap["battle_task_cell.icon"]
local point = uiMap["battle_task_cell.point"]
local desc = uiMap["battle_task_cell.desc"]
local check = uiMap["battle_task_cell.check"]
icon:setSprite(iconAtlas, iconName)
check:setVisible(over == true)
desc:setText(taskNum)
self:hidePoint(not taskNum)
self:hidePoint(false)
end
function BattleTaskCell:hidePoint(hide)

View File

@ -38,7 +38,7 @@ function DungeonRuneTaskUI:_display()
local condition = chapterCondition[newIndex]
if condition then
cell:getBaseObject():setActive(true)
local taskNum = taskProgress[index] and taskProgress[index].progress
local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress
local desc = self.runeData:getConditionDesc(condition, taskNum)
local over = false
if taskProgress[newIndex] then