diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 1899915c..d017137e 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -655,6 +655,7 @@ local LocalizationGlobalConst = CHAPTER_WAVE_REAWRD_3 = "CHAPTER_WAVE_REAWRD_3", MAIN_BTN_4 = "MAIN_BTN_4", MAIN_BTN_5 = "MAIN_BTN_5", + CHAPTER_BOX_DESC_1 = "CHAPTER_BOX_DESC_1", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index e0cb2eaf..5096fd3d 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -655,6 +655,7 @@ local localization_global = ["MAIN_BTN_3"] = "战斗", ["MAIN_BTN_4"] = "公司", ["MAIN_BTN_5"] = "玩法", + ["CHAPTER_BOX_DESC_1"] = "击败第{0}波敌人获得", } return localization_global \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/chapter_box_cell.lua b/lua/app/ui/main_city/cell/chapter_box_cell.lua index 2d93e4f8..2a3490ed 100644 --- a/lua/app/ui/main_city/cell/chapter_box_cell.lua +++ b/lua/app/ui/main_city/cell/chapter_box_cell.lua @@ -9,7 +9,7 @@ function ChapterBoxCell:init() self.claimImg = uiMap["cell.claim_img"] self.claimImgTx = uiMap["cell.claim_img.text"] self.rewardCells = {} - for i = 1, 2 do + for i = 1, 3 do self.rewardCells[i] = CellManager:addCellComp(uiMap["cell.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) end self.claimImgTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE)) @@ -27,7 +27,8 @@ function ChapterBoxCell:refresh(chapterId, idx) end self.chapterId = chapterId self.idx = idx - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.GET_REWARDS_DESC, idx)) + local needWave = DataManager.ChapterData:getChapterBoxNum(chapterId, idx) + self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.CHAPTER_BOX_DESC_1, needWave)) local hadGot = DataManager.ChapterData:getChapterBoxRewardGot(chapterId, idx) if hadGot then @@ -48,8 +49,13 @@ function ChapterBoxCell:refresh(chapterId, idx) end end - for i = 1, 2 do - self.rewardCells[i]:refreshByConfig(rewardCfg[i], hadGot, hadGot) + for i = 1, 3 do + if rewardCfg[i] then + self.rewardCells[i]:setActive(true) + self.rewardCells[i]:refreshByConfig(rewardCfg[i], hadGot, hadGot) + else + self.rewardCells[i]:setActive(false) + end end end