diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index de8a4cf1..e829abd4 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -27,6 +27,8 @@ local LocalizationGlobalConst = HERO_DESC_7 = "HERO_DESC_7", REWARD_PREVIEW_DESC = "REWARD_PREVIEW_DESC", + HERO_DESC_8 = "HERO_DESC_8", + HERO_DESC_9 = "HERO_DESC_9", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index 12ea5575..a8790335 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -39,6 +39,8 @@ local localization_global = ["BATTLE_DESC_7"] = "累计造成总伤害:{0}", ["REWARD_PREVIEW_DESC"] = "奖励预览", + ["HERO_DESC_8"] = "使用", + ["HERO_DESC_9"] = "信息", } return localization_global \ No newline at end of file diff --git a/lua/app/ui/common/cell/large_hero_cell.lua b/lua/app/ui/common/cell/large_hero_cell.lua index d7adb820..7fd62265 100644 --- a/lua/app/ui/common/cell/large_hero_cell.lua +++ b/lua/app/ui/common/cell/large_hero_cell.lua @@ -7,9 +7,10 @@ function LargeHeroCell:init() self.check = uiMap["hero_cell.hero_bg.mask"] self.matchImg = uiMap["hero_cell.hero_bg.match_img"] self.infoBtnDesc = uiMap["large_hero_cell.hero_bg.info_btn.desc"] - self.useBtn = uiMap["large_hero_cell.hero_bg.use_btn.desc"] + self.useBtnDesc = uiMap["large_hero_cell.hero_bg.use_btn.desc"] self.isGray = false + self.useBtnDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_8)) uiMap["large_hero_cell.hero_bg.info_btn"]:addClickListener(function() if not self.heroId or not self.matchType then return @@ -30,6 +31,13 @@ function LargeHeroCell:refresh(heroEntity, isGray) self.matchType = heroEntity:getMatchType() local heroInfo = heroEntity:getConfig() self:_refresh(heroInfo, isGray) + local str + if heroEntity:canLvUp() then + str = I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_4) + else + str = I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_9) + end + self.infoBtnDesc:setText(str) end function LargeHeroCell:refreshWithCfgId(id, isGray) @@ -37,6 +45,7 @@ function LargeHeroCell:refreshWithCfgId(id, isGray) self.heroId = id self.matchType = heroInfo.position self:_refresh(heroInfo, isGray) + self.infoBtnDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_9)) end function LargeHeroCell:_refresh(heroInfo, isGray)