This commit is contained in:
puxuan 2025-08-18 11:59:11 +08:00
parent bb135f8630
commit 15edce3169
3 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -655,6 +655,7 @@ local localization_global =
["MAIN_BTN_3"] = "战斗",
["MAIN_BTN_4"] = "公司",
["MAIN_BTN_5"] = "玩法",
["CHAPTER_BOX_DESC_1"] = "击败第{0}波敌人获得",
}
return localization_global

View File

@ -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
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