diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index 66509290..0bae5987 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -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()