fix bug
This commit is contained in:
parent
caf3d892fa
commit
b98475ed40
@ -773,7 +773,9 @@ function UIPrefabObject:addRedPoint(offsetX, offsetY, scale, iconName, count, na
|
||||
self.redPoint:setAnchoredPosition(offsetX or 0, offsetY or 0)
|
||||
self.redPoint:setLocalScale(scale, scale, scale)
|
||||
iconName = iconName or "common_info_1"
|
||||
self.redPoint:setSprite(GConst.ATLAS_PATH.COMMON, iconName)
|
||||
self.redPoint:setSprite(GConst.ATLAS_PATH.COMMON, iconName, function ()
|
||||
self.redPoint:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
|
||||
end)
|
||||
GFunc.getShakeSeq(self.redPoint, false, scale, true)
|
||||
if native then
|
||||
self.redPoint:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
|
||||
|
||||
@ -973,6 +973,7 @@ local LocalizationGlobalConst =
|
||||
TALENT_HELP = "TALENT_HELP",
|
||||
RECOMMENDED_POWER = "RECOMMENDED_POWER",
|
||||
CLICK_SKIP_DESC = "CLICK_SKIP_DESC",
|
||||
HERO_DESC_31 = "HERO_DESC_31",
|
||||
}
|
||||
|
||||
return LocalizationGlobalConst
|
||||
@ -973,6 +973,7 @@ local localization_global =
|
||||
["TALENT_HELP"] = "天赋帮助",
|
||||
["RECOMMENDED_POWER"] = "推荐战斗力:{0}",
|
||||
["CLICK_SKIP_DESC"] = "点击跳过",
|
||||
["HERO_DESC_31"] = "已上阵",
|
||||
}
|
||||
|
||||
return localization_global
|
||||
@ -20,8 +20,8 @@ function HeroManager:showHeroSkillInfoUI2(heroEntity, buffId)
|
||||
UIManager:showUI("app/ui/hero/hero_skill_info_ui_2", {heroEntity = heroEntity, buffId = buffId})
|
||||
end
|
||||
|
||||
function HeroManager:showAttrAllUI(heroEntity)
|
||||
UIManager:showUI("app/ui/hero/hero_attr_all_ui", {heroEntity = heroEntity})
|
||||
function HeroManager:showAttrAllUI()
|
||||
UIManager:showUI("app/ui/hero/hero_attr_all_ui")
|
||||
end
|
||||
|
||||
function HeroManager:upgradeHero(heroId, heroEntity, level)
|
||||
|
||||
@ -6,7 +6,7 @@ function HeroCell:init()
|
||||
self.icon = uiMap["hero_cell.hero_bg.icon"]
|
||||
self.heroBg = uiMap["hero_cell.hero_bg"]
|
||||
self.heroDec = uiMap["hero_cell.hero_bg.dec"]
|
||||
self.check = uiMap["hero_cell.hero_bg.mask"]
|
||||
self.inTimeBg = uiMap["hero_cell.hero_bg.in_time_bg"]
|
||||
self.matchImg = uiMap["hero_cell.hero_bg.match_img"]
|
||||
self.lvTx = uiMap["hero_cell.hero_bg.lv_tx"]
|
||||
-- 个人节点
|
||||
@ -18,6 +18,7 @@ function HeroCell:init()
|
||||
self.nameTx = uiMap["hero_cell.hero_bg.tx_name"]
|
||||
self.starComp = uiMap["hero_cell.hero_bg.star_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.STAR_CELL)
|
||||
self.unlockTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_7))
|
||||
uiMap["hero_cell.hero_bg.in_time_bg.in_time_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_31))
|
||||
|
||||
self.isGray = false
|
||||
self.baseObject:addClickListener(function()
|
||||
@ -55,7 +56,7 @@ function HeroCell:refresh(heroEntity, isGray)
|
||||
|
||||
if inTeam then
|
||||
if DataManager.EquipData:hasEquipRedPoint(heroEntity:getMatchType()) then
|
||||
self.baseObject:addRedPoint(70, 100, 1)
|
||||
self.baseObject:addRedPoint(74, 68, 1, "common_info_3")
|
||||
else
|
||||
self.baseObject:removeRedPoint()
|
||||
end
|
||||
@ -154,14 +155,14 @@ function HeroCell:_refresh(id, isGray)
|
||||
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt])
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[heroInfo.qlt])
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
|
||||
self.check:setActive(false)
|
||||
self.inTimeBg:setActive(false)
|
||||
self:refreshHeroIcon(heroInfo.icon)
|
||||
-- self:setGray(isGray)
|
||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(id))
|
||||
end
|
||||
|
||||
function HeroCell:showCheck(visible)
|
||||
self.check:setActive(visible)
|
||||
self.inTimeBg:setActive(visible)
|
||||
end
|
||||
|
||||
function HeroCell:addClickListener(callback)
|
||||
|
||||
@ -13,7 +13,6 @@ function HeroAttrUI:onPressBackspace()
|
||||
end
|
||||
|
||||
function HeroAttrUI:ctor(parmas)
|
||||
self.heroEntity = parmas.heroEntity
|
||||
end
|
||||
|
||||
function HeroAttrUI:onLoadRootComplete()
|
||||
|
||||
@ -54,8 +54,8 @@ function HeroComp:init()
|
||||
-- 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")
|
||||
|
||||
self.powerTx = self.uiMap["hero_ui.power_img.power_tx"]
|
||||
local attrTx = self.uiMap["hero_ui.bottom_bg.attr_bg.attr_tx"]
|
||||
self.powerTx = self.uiMap["hero_ui.formation.power_img.power_tx"]
|
||||
self.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 = {}
|
||||
@ -71,6 +71,9 @@ function HeroComp:init()
|
||||
self:refresh()
|
||||
end)
|
||||
end
|
||||
infoBtn:addClickListener(function()
|
||||
ModuleManager.HeroManager:showAttrAllUI()
|
||||
end)
|
||||
|
||||
for index, obj in ipairs(self.heroNodeList) do
|
||||
obj:addClickListener(function()
|
||||
@ -97,7 +100,7 @@ function HeroComp:init()
|
||||
self:refresh()
|
||||
end)
|
||||
|
||||
local powerImg = self.uiMap["hero_ui.power_img"]
|
||||
-- local powerImg = self.uiMap["hero_ui.formation.power_img"]
|
||||
local formationBg = self.uiMap["hero_ui.formation"]
|
||||
local bottomBg = self.uiMap["hero_ui.bottom_bg"]
|
||||
local viewport = self.uiMap["hero_ui.bottom_bg.scrollrect.viewport"]
|
||||
@ -106,7 +109,7 @@ function HeroComp:init()
|
||||
bottomBg:setSizeDeltaY(bgHeight)
|
||||
viewport:setSizeDeltaY(bgHeight - 230)
|
||||
formationBg:setAnchoredPositionY(bgHeight)
|
||||
powerImg:setAnchoredPositionY(bgHeight + 20)
|
||||
-- powerImg:setAnchoredPositionY(bgHeight + 20)
|
||||
end
|
||||
|
||||
function HeroComp:refresh(battleType)
|
||||
@ -128,6 +131,9 @@ function HeroComp:refresh(battleType)
|
||||
elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE then
|
||||
self:refreshDungeonRuneFormation()
|
||||
end
|
||||
|
||||
local attr = DataManager.HeroData:getAllStarAttr()
|
||||
self.attrTx:setText(GFunc.getFinalAttrValue(GConst.ATTR_ALL.ATTR_HPP_ALL, attr.attr_hpp_all or 0, 2))
|
||||
end
|
||||
|
||||
function HeroComp:updateFilter()
|
||||
|
||||
@ -30,7 +30,7 @@ function StarInfoComp:init()
|
||||
ModuleManager.HeroManager:upgradeHeroStar(self.heroEntity:getCfgId())
|
||||
end)
|
||||
self.attrBg:addClickListener(function()
|
||||
ModuleManager.HeroManager:showAttrAllUI(self.heroEntity)
|
||||
ModuleManager.HeroManager:showAttrAllUI()
|
||||
end)
|
||||
|
||||
self.scrollrect = uiMap["star_info.bg.scrollrect"]
|
||||
|
||||
@ -6,7 +6,7 @@ local SIDE_BAR_NODE_INTERVAL_X = 0
|
||||
|
||||
-- 侧边栏每项间距
|
||||
local SIDE_BAR_INTERVAL_X = 30
|
||||
local SIDE_BAR_INTERVAL_Y = 50
|
||||
local SIDE_BAR_INTERVAL_Y = 70
|
||||
|
||||
function SideBarComp:onReshow()
|
||||
self:checkSideBarOpenStatus()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user