From f4e02995ad017f0ede2481007198533cf39a48bd Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 17:37:32 +0800 Subject: [PATCH] fix bug --- lua/app/ui/main_city/component/main_comp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 9cee2a11..661314f8 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -230,7 +230,13 @@ function MainComp:refreshChapterInfo() end self.chapterPageNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout() - self.fightBtn:setActive(chapterId <= chapterMaxId + 1) + if chapterId <= chapterMaxId + 1 then + self.fightBtn:setTouchEnable(true) + self.fightBtn:setSprite(GConst.ATLAS_PATH.MAIN, "main_btn_1") + else + self.fightBtn:setTouchEnable(false) + self.fightBtn:setSprite(GConst.ATLAS_PATH.MAIN, "main_btn_4") + end local chapterI18NInfo = I18N:getConfig("chapter")[chapterId] if chapterI18NInfo then