From 58e5bbc33d76fcb650a0eeb72e0d66500e7d26e9 Mon Sep 17 00:00:00 2001 From: chenxi Date: Thu, 1 Jun 2023 20:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E7=95=8C=E9=9D=A2=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=9F=B3=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/main_city/cell/bottom_btn_cell.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/app/ui/main_city/cell/bottom_btn_cell.lua b/lua/app/ui/main_city/cell/bottom_btn_cell.lua index 19231612..613db94b 100644 --- a/lua/app/ui/main_city/cell/bottom_btn_cell.lua +++ b/lua/app/ui/main_city/cell/bottom_btn_cell.lua @@ -24,7 +24,13 @@ function BottomBtnCell:refresh(desc, selected, showAni) end function BottomBtnCell:addClickListener(func) - self:getBaseObject():addClickListener(func, GConst.CLICK_SOUND.NORMAL) + self:getBaseObject():addClickListener(function() + local audioPath = AudioManager.CLICK_ID[GConst.CLICK_SOUND.NORMAL] + if audioPath then + AudioManager:playEffect(audioPath) + end + func() + end, GConst.CLICK_SOUND.NONE) end function BottomBtnCell:getCurLocalPosX()