From e2e17b28c62b49e724c0707faf4d8a791a83c123 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 27 Jul 2023 09:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/dungeon_armor/cell/chapter_cell.lua | 4 ++++ lua/app/ui/dungeon_armor/dungeon_armor_main_ui.lua | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/lua/app/ui/dungeon_armor/cell/chapter_cell.lua b/lua/app/ui/dungeon_armor/cell/chapter_cell.lua index dce90533..b8daec19 100644 --- a/lua/app/ui/dungeon_armor/cell/chapter_cell.lua +++ b/lua/app/ui/dungeon_armor/cell/chapter_cell.lua @@ -50,6 +50,10 @@ function ChapterCell:refresh(id) touchNode:addClickListener(function() ModuleManager.DungeonArmorManager:showFarmUI(id) end) + + if armorData:getRemianFarmCount(id) <= 0 then + farmNode:setVisible(false) + end elseif armorData:canFightChapter(id) then -- 可挑战 farmNode:setVisible(false) if starNum > 0 then -- 通关过 diff --git a/lua/app/ui/dungeon_armor/dungeon_armor_main_ui.lua b/lua/app/ui/dungeon_armor/dungeon_armor_main_ui.lua index 793867f4..7c2fccd0 100644 --- a/lua/app/ui/dungeon_armor/dungeon_armor_main_ui.lua +++ b/lua/app/ui/dungeon_armor/dungeon_armor_main_ui.lua @@ -111,6 +111,7 @@ function DungeonArmorMainUI:_bind() self:refreshFund() self:refreshFormation() self:refreshStarNode() + self:refreshAllCells() end) self:bind(DataManager.FormationData, "dirty", function() @@ -138,6 +139,14 @@ function DungeonArmorMainUI:refreshScrollrect() self:refreshCloud(self.unlockId) end +function DungeonArmorMainUI:refreshAllCells() + if not self.scrollRect then + return + end + + self.scrollRect:refreshAll() +end + function DungeonArmorMainUI:refreshFormation() if not self.formationComp then local uiMap = self.root:genAllChildren()