From 5ccdd1e41795cb7cce31a33978ec21529fe07ad3 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 21 Apr 2023 10:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/hero_detail_ui.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()