fix bug
This commit is contained in:
parent
bb135f8630
commit
15edce3169
@ -655,6 +655,7 @@ local LocalizationGlobalConst =
|
|||||||
CHAPTER_WAVE_REAWRD_3 = "CHAPTER_WAVE_REAWRD_3",
|
CHAPTER_WAVE_REAWRD_3 = "CHAPTER_WAVE_REAWRD_3",
|
||||||
MAIN_BTN_4 = "MAIN_BTN_4",
|
MAIN_BTN_4 = "MAIN_BTN_4",
|
||||||
MAIN_BTN_5 = "MAIN_BTN_5",
|
MAIN_BTN_5 = "MAIN_BTN_5",
|
||||||
|
CHAPTER_BOX_DESC_1 = "CHAPTER_BOX_DESC_1",
|
||||||
}
|
}
|
||||||
|
|
||||||
return LocalizationGlobalConst
|
return LocalizationGlobalConst
|
||||||
@ -655,6 +655,7 @@ local localization_global =
|
|||||||
["MAIN_BTN_3"] = "战斗",
|
["MAIN_BTN_3"] = "战斗",
|
||||||
["MAIN_BTN_4"] = "公司",
|
["MAIN_BTN_4"] = "公司",
|
||||||
["MAIN_BTN_5"] = "玩法",
|
["MAIN_BTN_5"] = "玩法",
|
||||||
|
["CHAPTER_BOX_DESC_1"] = "击败第{0}波敌人获得",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -9,7 +9,7 @@ function ChapterBoxCell:init()
|
|||||||
self.claimImg = uiMap["cell.claim_img"]
|
self.claimImg = uiMap["cell.claim_img"]
|
||||||
self.claimImgTx = uiMap["cell.claim_img.text"]
|
self.claimImgTx = uiMap["cell.claim_img.text"]
|
||||||
self.rewardCells = {}
|
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)
|
self.rewardCells[i] = CellManager:addCellComp(uiMap["cell.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
||||||
end
|
end
|
||||||
self.claimImgTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE))
|
self.claimImgTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE))
|
||||||
@ -27,7 +27,8 @@ function ChapterBoxCell:refresh(chapterId, idx)
|
|||||||
end
|
end
|
||||||
self.chapterId = chapterId
|
self.chapterId = chapterId
|
||||||
self.idx = idx
|
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)
|
local hadGot = DataManager.ChapterData:getChapterBoxRewardGot(chapterId, idx)
|
||||||
if hadGot then
|
if hadGot then
|
||||||
@ -48,8 +49,13 @@ function ChapterBoxCell:refresh(chapterId, idx)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, 2 do
|
for i = 1, 3 do
|
||||||
self.rewardCells[i]:refreshByConfig(rewardCfg[i], hadGot, hadGot)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user