界面处理
This commit is contained in:
parent
dc5a37ac0f
commit
00b1c43f54
@ -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
|
||||
@ -39,6 +39,8 @@ local localization_global =
|
||||
["BATTLE_DESC_7"] = "累计造成总伤害:<color=#89FF76>{0}</color>",
|
||||
|
||||
["REWARD_PREVIEW_DESC"] = "奖励预览",
|
||||
["HERO_DESC_8"] = "使用",
|
||||
["HERO_DESC_9"] = "信息",
|
||||
}
|
||||
|
||||
return localization_global
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user