diff --git a/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua b/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua index 3b87e3b0..eba93927 100644 --- a/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua +++ b/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua @@ -37,34 +37,45 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount) lightImg:setVisible(false) sweep:setVisible(false) local passed = false - if runeData:curFight(id) then -- 正在可打的 - curBg:setVisible(true) - fightBg:setVisible(false) - - local layer = uiMap["chapter_cell.touch_node.bg_cur.desc"] - layer:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id)) + local isBossChapter = runeData:isBossChapter(id) + curBg:setVisible(isBossChapter) + fightBg:setVisible(not isBossChapter) + local curLayerDecs + local curLock + local curMask + if isBossChapter then + curLayerDecs = uiMap["chapter_cell.touch_node.bg_cur.desc"] + curLock = uiMap["chapter_cell.touch_node.bg_cur.lock"] + curMask = uiMap["chapter_cell.touch_node.bg_cur.bg_mask"] else - curBg:setVisible(false) - fightBg:setVisible(true) + curLayerDecs = uiMap["chapter_cell.touch_node.bg.desc"] + curLock = uiMap["chapter_cell.touch_node.bg.lock"] + curMask = uiMap["chapter_cell.touch_node.bg.bg_mask"] + end - local layer = uiMap["chapter_cell.touch_node.bg.desc"] - layer:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id)) - local lock = uiMap["chapter_cell.touch_node.bg.lock"] - if maxPassedId >= id then -- 已通关的 - passed = true - local canSweep = runeData:canSweep(id) - sweep:setVisible(canSweep) - if canSweep then - uiMap["chapter_cell.touch_node.sweep_bg.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH)) - end - lock:setVisible(false) - layer:setAnchoredPositionX(0) - -- lightImg:setVisible(true) - -- descMinRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, runeData:getChapterPassRound(id))) - -- descMinRound:setVisible(true) + curLayerDecs:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id)) + if maxPassedId >= id then -- 已通关的 + passed = true + local canSweep = runeData:canSweep(id) + sweep:setVisible(canSweep) + if canSweep then + uiMap["chapter_cell.touch_node.sweep_bg.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH)) + end + curLock:setVisible(false) + curMask:setVisible(false) + curLayerDecs:setAnchoredPositionX(0) + -- lightImg:setVisible(true) + -- descMinRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, runeData:getChapterPassRound(id))) + -- descMinRound:setVisible(true) + else + if runeData:canFight(id) then + curLock:setVisible(false) + curMask:setVisible(false) + curLayerDecs:setAnchoredPositionX(0) else - lock:setVisible(true) - GFunc.centerImgAndTx(lock, layer, 5) + curLock:setVisible(true) + curMask:setVisible(true) + GFunc.centerImgAndTx(curLock, curLayerDecs, 5) end end @@ -79,8 +90,20 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount) for i, cell in ipairs(self.rewardCells) do if rewards[i] then cell:refreshByConfig(rewards[i], passed, passed) + if isBossChapter then + cell:getBaseObject():setLocalScale(0.6, 0.6, 0.6) + else + cell:getBaseObject():setLocalScale(0.5, 0.5, 0.5) + end end end + if isBossChapter then + self.rewardCells[1]:getBaseObject():setAnchoredPositionX(-43) + self.rewardCells[2]:getBaseObject():setAnchoredPositionX(43) + else + self.rewardCells[1]:getBaseObject():setAnchoredPositionX(-35) + self.rewardCells[2]:getBaseObject():setAnchoredPositionX(35) + end end function RuneChapterCell:addClickListener(func)