英雄适配

This commit is contained in:
puxuan 2025-10-13 19:36:05 +08:00
parent 91ac8062ba
commit 13e2386a4a

View File

@ -47,9 +47,11 @@ function HeroDetailUI:onLoadRootComplete()
self:closeUI()
end)
self.bg = uiMap["hero_detail_ui.bg"]
self.heroInfo = uiMap["hero_detail_ui.middle.hero_info"]
self.starInfo = uiMap["hero_detail_ui.middle.star_info"]
self.equipInfo = uiMap["hero_detail_ui.middle.equip_info"]
self.top = uiMap["hero_detail_ui.top"]
self.titleTx = uiMap["hero_detail_ui.top.name_tx"]
self.leftBtn = uiMap["hero_detail_ui.top.left_btn"]
self.rightBtn = uiMap["hero_detail_ui.top.right_btn"]
@ -178,8 +180,11 @@ function HeroDetailUI:onLoadRootComplete()
local middle = uiMap["hero_detail_ui.middle"]
local rect = self.root:getRectSize()
local bgHeight = rect.height * 0.66
middle:setSizeDeltaY(bgHeight)
local bgHeight = rect.height * 0.64
local bgHeight1 = rect.height * 0.66
middle:setSizeDeltaY(bgHeight1)
self.top:setAnchoredPositionY(bgHeight)
self.bg:setAnchoredPositionY(bgHeight)
end
function HeroDetailUI:initList()