显示问题

This commit is contained in:
xiekaidong 2023-05-31 14:30:17 +08:00
parent 6571f6f480
commit fabf2372d4
2 changed files with 5 additions and 5 deletions

View File

@ -125,7 +125,7 @@ function BattleResultUI:refreshRewards()
end)
self.scrollRectComp:addRefreshCallback(function(index, cell)
cell:refresh(self.rewards[index])
cell:showLeftUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1")
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1")
end)
self.scrollRectComp:setFadeArgs(0.05, 0.3)
self.scrollRectComp:clearCells()

View File

@ -8,7 +8,7 @@ function RewardCell:init()
self.check = uiMap["reward_cell.check"]
self.numTx = uiMap["reward_cell.item_bg.num"]
self.fragment = uiMap["reward_cell.item_bg.fragment"]
self.leftUpIcon = uiMap["reward_cell.item_bg.left_up_icon"]
self.rightUpIcon = uiMap["reward_cell.item_bg.right_up_icon"]
self.sImg = uiMap["reward_cell.item_bg.s"]
self.matchImg = uiMap["reward_cell.item_bg.match_img"]
self.frameAni = uiMap["reward_cell.frame_ani"]
@ -149,12 +149,12 @@ function RewardCell:hideFrameAnimation()
self.frameAni:setVisible(false)
end
function RewardCell:showLeftUpIcon(show, atlas, iconName)
self.leftUpIcon:setVisible(show)
function RewardCell:showRightUpIcon(show, atlas, iconName)
self.rightUpIcon:setVisible(show)
if not show then
return
end
self.leftUpIcon:setSprite(atlas, iconName)
self.rightUpIcon:setSprite(atlas, iconName)
end
return RewardCell