diff --git a/lua/app/bf/unity/uiprefab_object.lua b/lua/app/bf/unity/uiprefab_object.lua index df43fe27..8703ff75 100644 --- a/lua/app/bf/unity/uiprefab_object.lua +++ b/lua/app/bf/unity/uiprefab_object.lua @@ -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() diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 31f07bb5..fe7bb4c4 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -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 \ 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 6ce2beeb..c673fc1c 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -973,6 +973,7 @@ local localization_global = ["TALENT_HELP"] = "天赋帮助", ["RECOMMENDED_POWER"] = "推荐战斗力:{0}", ["CLICK_SKIP_DESC"] = "点击跳过", + ["HERO_DESC_31"] = "已上阵", } return localization_global \ No newline at end of file diff --git a/lua/app/module/hero/hero_manager.lua b/lua/app/module/hero/hero_manager.lua index 02dd4af4..47c7c6f0 100644 --- a/lua/app/module/hero/hero_manager.lua +++ b/lua/app/module/hero/hero_manager.lua @@ -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) diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 0fa592c1..6455d86b 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -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) diff --git a/lua/app/ui/hero/hero_attr_all_ui.lua b/lua/app/ui/hero/hero_attr_all_ui.lua index d27ef73d..2c2a02f5 100644 --- a/lua/app/ui/hero/hero_attr_all_ui.lua +++ b/lua/app/ui/hero/hero_attr_all_ui.lua @@ -13,7 +13,6 @@ function HeroAttrUI:onPressBackspace() end function HeroAttrUI:ctor(parmas) - self.heroEntity = parmas.heroEntity end function HeroAttrUI:onLoadRootComplete() diff --git a/lua/app/ui/hero/hero_comp.lua b/lua/app/ui/hero/hero_comp.lua index d7c671f5..3b337ea6 100644 --- a/lua/app/ui/hero/hero_comp.lua +++ b/lua/app/ui/hero/hero_comp.lua @@ -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() diff --git a/lua/app/ui/hero/star_info_comp.lua b/lua/app/ui/hero/star_info_comp.lua index 39ee343f..9eddecfd 100644 --- a/lua/app/ui/hero/star_info_comp.lua +++ b/lua/app/ui/hero/star_info_comp.lua @@ -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"] diff --git a/lua/app/ui/main_city/component/side_bar_comp.lua b/lua/app/ui/main_city/component/side_bar_comp.lua index 9b199245..841a9528 100644 --- a/lua/app/ui/main_city/component/side_bar_comp.lua +++ b/lua/app/ui/main_city/component/side_bar_comp.lua @@ -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()