hero
This commit is contained in:
parent
6107c663e5
commit
f5ce465420
@ -9,7 +9,6 @@ function HeroCell:init()
|
||||
self.check = uiMap["hero_cell.hero_bg.mask"]
|
||||
self.matchImg = uiMap["hero_cell.hero_bg.match_img"]
|
||||
self.lvTx = uiMap["hero_cell.hero_bg.lv_tx"]
|
||||
self.sImg = uiMap["hero_cell.hero_bg.s"]
|
||||
-- 个人节点
|
||||
self.selfNode = uiMap["hero_cell.hero_bg.self_node"]
|
||||
self.progressBg = uiMap["hero_cell.hero_bg.self_node.progress_bg"]
|
||||
@ -175,7 +174,6 @@ function HeroCell:_refresh(heroInfo, isGray)
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.HERO, GConst.HERO_DEC_QLT[heroInfo.qlt])
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
|
||||
self.check:setVisible(false)
|
||||
self.sImg:setVisible(heroInfo.qlt >= 4)
|
||||
self:refreshHeroIcon(heroInfo.icon)
|
||||
self:setGray(isGray)
|
||||
end
|
||||
|
||||
@ -51,13 +51,17 @@ function HeroComp:init()
|
||||
UIManager:showUI("app/ui/collection/collection_ui", GConst.CollectionConst.TYPE.HERO)
|
||||
end)
|
||||
self.uiMap["hero_ui.btn_collect.tx_collect"]:setText(I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_10))
|
||||
-- self.uiMap["hero_ui.bottom_bg.filter_bg.btn_0.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_10))
|
||||
self.uiMap["hero_ui.bottom_bg.filter_bg.btn_0.desc_tx"]:setText("ALL")
|
||||
|
||||
local attrTx = self.uiMap["hero_ui.bottom_bg.attr_bg.attr_tx"]
|
||||
local infoBtn = self.uiMap["hero_ui.bottom_bg.attr_bg.info_btn"]
|
||||
self.elementType = 0
|
||||
self.elementTypeBtns = {}
|
||||
self.elementTypeBtnFilters = {}
|
||||
for i = 0, 5 do
|
||||
self.elementTypeBtns[i] = self.uiMap["hero_ui.bottom_bg.filter_bg.btn_" .. i]
|
||||
self.elementTypeBtnFilters[i] = self.uiMap["hero_ui.bottom_bg.filter_bg.btn_" .. i .. ".filter_img"]
|
||||
self.elementTypeBtns[i]:addClickListener(function()
|
||||
if self.elementType == i then
|
||||
return
|
||||
@ -99,6 +103,7 @@ function HeroComp:refresh(battleType)
|
||||
self:clearAdapt()
|
||||
self:adapt()
|
||||
self:refreshCollectEntrance()
|
||||
self:updateFilter()
|
||||
if self.battleType == GConst.BattleConst.FORMATION_TYPE.STAGE then
|
||||
self:refreshStageFormation()
|
||||
elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.ARENA_ATTACK then
|
||||
@ -116,6 +121,12 @@ function HeroComp:refresh(battleType)
|
||||
end
|
||||
end
|
||||
|
||||
function HeroComp:updateFilter()
|
||||
for i = 0, 5 do
|
||||
self.elementTypeBtnFilters[i]:setActive(i == self.elementType)
|
||||
end
|
||||
end
|
||||
|
||||
-- 展示主线章节阵容
|
||||
function HeroComp:refreshStageFormation()
|
||||
self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.MAIN_BTN_2))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user