显示优化
This commit is contained in:
parent
dd62b41f00
commit
d56fd65a70
@ -37,19 +37,23 @@ 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"]
|
||||
curLayerDecs:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id))
|
||||
if maxPassedId >= id then -- 已通关的
|
||||
passed = true
|
||||
local canSweep = runeData:canSweep(id)
|
||||
@ -57,14 +61,21 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
|
||||
if canSweep then
|
||||
uiMap["chapter_cell.touch_node.sweep_bg.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
|
||||
end
|
||||
lock:setVisible(false)
|
||||
layer:setAnchoredPositionX(0)
|
||||
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
|
||||
lock:setVisible(true)
|
||||
GFunc.centerImgAndTx(lock, layer, 5)
|
||||
if runeData:canFight(id) then
|
||||
curLock:setVisible(false)
|
||||
curMask:setVisible(false)
|
||||
curLayerDecs:setAnchoredPositionX(0)
|
||||
else
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user