diff --git a/lua/app/ui/daily_challenge/cell/task_cell.lua b/lua/app/ui/daily_challenge/cell/task_cell.lua index 7feb7af0..034a0b0b 100644 --- a/lua/app/ui/daily_challenge/cell/task_cell.lua +++ b/lua/app/ui/daily_challenge/cell/task_cell.lua @@ -1,6 +1,6 @@ local TaskCell = class("TaskCell", BaseCell) -local ICON_BG = {"common_board_131", "common_board_132"} +local ICON_BG = {"act_common_bg_14", "act_common_bg_14"} local ICON = {"daily_task_1", "daily_task_2"} function TaskCell:refresh(taskInfo, customProgress) @@ -9,7 +9,7 @@ function TaskCell:refresh(taskInfo, customProgress) local uiMap = self:getUIMap() local cfg = DataManager.DailyChallengeData:getTaskCfg()[taskInfo.task_id] local icon = complete and ICON_BG[2] or ICON_BG[1] - -- uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.COMMON, icon) + uiMap["task_cell.bg"]:setSprite(GConst.ATLAS_PATH.ACT_COMMON, icon) -- icon = complete and ICON[2] or ICON[1] -- uiMap["task_cell.task_icon"]:setSprite(GConst.ATLAS_PATH.DAILY_CHALLENGE, icon) uiMap["task_cell.desc"]:setText(DataManager.DailyChallengeData:getTaskDesc(taskInfo.task_id, true, customProgress)) @@ -18,7 +18,7 @@ function TaskCell:refresh(taskInfo, customProgress) local cell = uiMap["task_cell.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) if cfg.reward[i] then cell:setActive(true) - cell:refreshByConfig(cfg.reward[i]) + cell:refreshByConfig(cfg.reward[i], complete, complete) else cell:setActive(false) end diff --git a/lua/app/ui/task/task_main_ui.lua b/lua/app/ui/task/task_main_ui.lua index 6980fa2b..e7e2db29 100644 --- a/lua/app/ui/task/task_main_ui.lua +++ b/lua/app/ui/task/task_main_ui.lua @@ -65,11 +65,13 @@ function TaskMainUI:onLoadRootComplete() self.dailyTaskFinalCellProgressTx = uiMap["task_main_ui.bg.daily.task_final_cell.progress_tx"] self.boxBtns = {} self.boxBtnTxs = {} + self.boxBtnSpines = {} local stageIds = DataManager.DailyTaskData:getStageIds() for i = 1, 5 do self.boxBtns[i] = uiMap["task_main_ui.bg.daily.task_final_cell.box_" .. i] self.boxBtnTxs[i] = uiMap["task_main_ui.bg.daily.task_final_cell.box_" .. i .. ".text"] self.boxBtnTxs[i]:setText(DataManager.DailyTaskData:getStageCondition(stageIds[i])) + self.boxBtnSpines[i] = uiMap["task_main_ui.bg.daily.task_final_cell.box_" .. i .. ".ui_spine_obj"] -- self.boxBtns[i]:addClickListener(function() -- GFunc.showToast(i) -- -- local taskId = DataManager.DailyTaskData:getDailyTaskFinalId() @@ -166,11 +168,17 @@ function TaskMainUI:refreshDaily() local stageId = stageIds[i] if stageId then item:setActive(true) - if DataManager.DailyTaskData:canClaimStage(stageId) then + if DataManager.DailyTaskData:isStageReceived(stageId) then + self.boxBtnSpines[i]:playAnim("idle02", true, false) + elseif DataManager.DailyTaskData:canClaimStage(stageId) then + self.boxBtnSpines[i]:playAnim("ready", true, false) item:addClickListener(function() - self:onClickBox() + self.boxBtnSpines[i]:playAnimComplete("open", false, true, function() + self:onClickBox() + end) end) else + self.boxBtnSpines[i]:playAnim("idle01", true, false) item:addClickListener(function() ModuleManager.TipsManager:showRewardsTips(DataManager.DailyTaskData:getStageReward(stageId), nil, item) end)