From d65f0021e1cb08844e2b3a53d7a33d24960a716d Mon Sep 17 00:00:00 2001 From: chenxi Date: Fri, 21 Apr 2023 23:31:49 +0800 Subject: [PATCH] icon frame --- lua/app/global/global_const.lua | 2 +- lua/app/ui/common/cell/hero_cell.lua | 2 +- lua/app/ui/common/cell/large_hero_cell.lua | 2 +- lua/app/ui/common/cell/reward_cell.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 8d72c458..3c9b33d0 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -361,7 +361,7 @@ GConst.HERO_FRAME = { RED = "frame_7", } -GConst.HERO_FRAME_QLT = { +GConst.FRAME_QLT = { [1] = "frame_1", [2] = "frame_2", [3] = "frame_3", diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index e3f1614b..73c0fad7 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -73,7 +73,7 @@ function HeroCell:_refresh(heroInfo, isGray) if isGray then self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_GRAY_QLT[heroInfo.qlt]) 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 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]) diff --git a/lua/app/ui/common/cell/large_hero_cell.lua b/lua/app/ui/common/cell/large_hero_cell.lua index 10bfc51a..2aa5520e 100644 --- a/lua/app/ui/common/cell/large_hero_cell.lua +++ b/lua/app/ui/common/cell/large_hero_cell.lua @@ -56,7 +56,7 @@ function LargeHeroCell:_refresh(heroInfo, isGray) if isGray then self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_FRAME_GRAY_QLT[heroInfo.qlt]) 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 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]) diff --git a/lua/app/ui/common/cell/reward_cell.lua b/lua/app/ui/common/cell/reward_cell.lua index 1d8195d2..3f55c740 100644 --- a/lua/app/ui/common/cell/reward_cell.lua +++ b/lua/app/ui/common/cell/reward_cell.lua @@ -48,7 +48,7 @@ function RewardCell:_refreshItem(item) return end 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) if info.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then local heroInfo = ConfigManager:getConfig("hero")[info.parameter]