icon frame

This commit is contained in:
chenxi 2023-04-21 23:31:49 +08:00
parent 7851d2a5d2
commit d65f0021e1
4 changed files with 4 additions and 4 deletions

View File

@ -361,7 +361,7 @@ GConst.HERO_FRAME = {
RED = "frame_7", RED = "frame_7",
} }
GConst.HERO_FRAME_QLT = { GConst.FRAME_QLT = {
[1] = "frame_1", [1] = "frame_1",
[2] = "frame_2", [2] = "frame_2",
[3] = "frame_3", [3] = "frame_3",

View File

@ -73,7 +73,7 @@ function HeroCell:_refresh(heroInfo, isGray)
if isGray then if isGray then
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_GRAY_QLT[heroInfo.qlt]) self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_GRAY_QLT[heroInfo.qlt])
else else
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_QLT[heroInfo.qlt]) self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt])
end end
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon)) self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon))
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])

View File

@ -56,7 +56,7 @@ function LargeHeroCell:_refresh(heroInfo, isGray)
if isGray then if isGray then
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_GRAY_QLT[heroInfo.qlt]) self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_GRAY_QLT[heroInfo.qlt])
else else
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_QLT[heroInfo.qlt]) self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt])
end end
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon)) self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon))
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])

View File

@ -48,7 +48,7 @@ function RewardCell:_refreshItem(item)
return return
end end
self.numTx:setVisible(true) self.numTx:setVisible(true)
self.frameBg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, "frame_0") self.frameBg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[info.qlt])
self.numTx:setText(item.count or item.num) self.numTx:setText(item.count or item.num)
if info.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then if info.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then
local heroInfo = ConfigManager:getConfig("hero")[info.parameter] local heroInfo = ConfigManager:getConfig("hero")[info.parameter]