Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev

This commit is contained in:
chenxi 2023-04-18 20:37:24 +08:00
commit 7ee1d620bb
4 changed files with 25 additions and 6 deletions

View File

@ -55,7 +55,7 @@ end
function HeroManager:getSkillIcon(skillId)
local cfg = ConfigManager:getConfig("skill")[skillId]
return cfg and tostring(cfg.icon)
return cfg and tostring(cfg.battle_icon)
end
function HeroManager:getSkillRogueDesc(skillId)
@ -68,6 +68,16 @@ function HeroManager:getSkillRogueIcon(skillId)
return cfg and tostring(cfg.icon)
end
function HeroManager:getSkillRogueBattleBg(skillId)
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
return cfg and "battle_board_" .. cfg.qlt
end
function HeroManager:getSkillRogueBg(skillId)
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
return cfg and "frame_" .. cfg.qlt
end
function HeroManager:getActiveRogueLvs()
if not self.activeRogueLvs then
self.activeRogueLvs = {}

View File

@ -16,6 +16,7 @@ function BattleSelectSkillCell:refresh(skillId, func)
self.selectSkillCell = CellManager:addCellComp(uiMap["skill_select_cell.skill_select_cell"], SELECT_SKILL_CELL)
end
self.selectSkillCell:refresh(skillId)
uiMap["skill_select_cell.img"]:setSprite(GConst.ATLAS_PATH.BATTLE, ModuleManager.HeroManager:getSkillRogueBattleBg(skillId))
end
return BattleSelectSkillCell

View File

@ -5,6 +5,7 @@ function SelectSkillCell:refresh(skillId, count)
uiMap["skill_select_cell.icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
-- uiMap["skill_select_cell.value"]:setText()
uiMap["skill_select_cell.count"]:setText(count or GConst.EMPTY_STRING)
self.baseObject:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueBg(skillId))
end
function SelectSkillCell:addClickListener(func)

View File

@ -2,6 +2,12 @@ local HeroDetailUI = class("HeroDetailUI", BaseUI)
local DEFAULT_FACTOR = GConst.BattleConst.DEFAULT_FACTOR
local SKILL_BUFF_BG = {
[2] = "frame_1",
[3] = "frame_2",
[4] = "frame_3",
}
function HeroDetailUI:isFullScreen()
return false
end
@ -46,15 +52,16 @@ function HeroDetailUI:_display()
for i = 1, 3 do
local skillId = skillList[i]
if skillId then
local skillIcon = uiMap["hero_detail_ui.bg.skill_up_" .. i]
local skillIcon = uiMap["hero_detail_ui.bg.skill_up_" .. i .. ".icon"]
local skillBg = uiMap["hero_detail_ui.bg.skill_up_" .. i]
local skillLv = uiMap["hero_detail_ui.bg.skill_up_" .. i .. ".desc"]
skillIcon:addClickListener(function()
skillBg:addClickListener(function()
ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId), skillIcon)
end)
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueBg(skillId))
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
skillIcon:setImageGray(i > activeCount)
skillIcon:setTouchEnable(true)
skillBg:setImageGray(i > activeCount)
skillBg:setTouchEnable(true)
if i > activeCount then
skillLv:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, skillLvs[i] or 0))
else