diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index e7cd93d0..0d4e05f3 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -107,8 +107,11 @@ function HeroDetailUI:_display() uiMap["hero_detail_ui.bg.up_btn.rp"]:setVisible(self.heroEntity:canLvUp()) uiMap["hero_detail_ui.bg.hp"]:setText(hpStr) uiMap["hero_detail_ui.bg.atk"]:setText(atkStr) - uiMap["hero_detail_ui.bg.up_btn"]:setImageGray(not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GOLD, materials[2] or 0)) - uiMap["hero_detail_ui.bg.up_btn"]:setActive(not self.heroEntity:isMaxLv()) + + local btn = uiMap["hero_detail_ui.bg.up_btn"] + btn:setImageGray(not canLvUp) + btn:setTouchEnable(true) + btn:setActive(not self.heroEntity:isMaxLv()) end function HeroDetailUI:_addListeners()