From fa61ea1317a1b4f2f8e71277509efff15d6d64da Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 22 Apr 2021 20:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ios=E6=8E=A8=E8=8D=90=E6=9C=8D?= =?UTF-8?q?=E3=80=91=E7=99=BD=E7=89=87=E5=A4=84=E7=90=86=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E5=9B=9E=E5=88=B0=E4=B8=BB=E7=95=8C=E9=9D=A2=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E9=A1=B5=E7=AD=BE=E9=BB=91=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Framework/Manager/UIManager.lua | 14 ++++++++------ .../~Lua/Modules/Carbon/EndLessCarbonPanel.lua | 13 +++++-------- .../View/ExpeditionMonsterInfo_Monster.lua | 1 + .../~Lua/Modules/Formation/FormationPanel.lua | 1 - .../~Lua/Modules/Map/View/EndLessMapView.lua | 4 +++- .../~Lua/Modules/RoleInfo/RoleInfoPanel.lua | 3 +++ Assets/ManagedResources/~Lua/View/BtView.lua | 2 +- Assets/ManagedResources/~Lua/View/UpView.lua | 1 + 8 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Framework/Manager/UIManager.lua b/Assets/ManagedResources/~Lua/Framework/Manager/UIManager.lua index e7b79264a4..162f4947e2 100644 --- a/Assets/ManagedResources/~Lua/Framework/Manager/UIManager.lua +++ b/Assets/ManagedResources/~Lua/Framework/Manager/UIManager.lua @@ -557,7 +557,7 @@ function UIManager.CloseStackPanel(uiConfig,isDestroy) --如果是全屏窗口,向后回退到一个全屏窗口为止 if uiConfig.type == UIType.FullType then -- 找到上一个全屏窗口的位置 - local startIndex + local startIndex = 1 for i = #this.stackList, 1,-1 do local panel = this.stackList[i] if panel.uiConfig.type == UIType.FullType then @@ -566,11 +566,13 @@ function UIManager.CloseStackPanel(uiConfig,isDestroy) end end -- - for i = startIndex, #this.stackList do - local panel = this.stackList[i] - if panel then - panel.gameObject:SetActive(true) - panel:OpenUI(true) + if startIndex then + for i = startIndex, #this.stackList do + local panel = this.stackList[i] + if panel then + panel.gameObject:SetActive(true) + panel:OpenUI(true) + end end end else diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua index 1ce9caa36e..969d2bf3db 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua @@ -56,15 +56,12 @@ function EndLessCarbonPanel:BindEvent() Util.AddClick(this.btnBack, function () -- !!!! PS: 这里必须是主动打开副本选择界面,从地图中返回时,这个界面的上一级是地图界面, -- 如果只是关闭自己,则会打开地图界面,不会打开副本选择界面,导致报错 - PlayerManager.carbonType = 1 - UIManager.OpenPanel(UIName.MainPanel) - UIManager.OpenPanel(UIName.CarbonTypePanelV2) - UIManager.OpenPanel(UIName.EndLessCarbonPanel) + PlayerManager.carbonType = 2 + self:ClosePanel() + -- UIManager.ClosePanel(UIName.EndLessCarbonPanel) + -- UIManager.OpenPanel(UIName.MainPanel) + -- --检测到上一个面板打开之后,关闭自己 -- CallBackOnPanelOpen(UIName.MainPanel, function() - -- --检测到上一个面板打开之后,关闭自己 - -- CallBackOnPanelOpen(UIName.CarbonTypePanelV2, function() - -- UIManager.ClosePanel(UIName.EndLessCarbonPanel) - -- end) -- UIManager.OpenPanel(UIName.CarbonTypePanelV2) -- end) CarbonManager.difficulty = 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/View/ExpeditionMonsterInfo_Monster.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/View/ExpeditionMonsterInfo_Monster.lua index 2bcd7e1a8f..391dfc6d10 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/View/ExpeditionMonsterInfo_Monster.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/View/ExpeditionMonsterInfo_Monster.lua @@ -19,6 +19,7 @@ function this:InitComponent(gameObject) this.spLoader = SpriteLoader.New() this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text") this.power = Util.GetGameObject(gameObject, "Power/Value"):GetComponent("Text") + Util.GetGameObject(gameObject, "Power"):GetComponent("Image").sprite = this.spLoader:LoadSprite("t_tongyong-zhanli_zh") this.sureBtn=Util.GetGameObject(gameObject,"sureBtn") this.sureBtnText=Util.GetGameObject(gameObject,"sureBtn/Text"):GetComponent("Text") --滚动条根节点 diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanel.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanel.lua index edecc66108..d856659e20 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanel.lua @@ -70,7 +70,6 @@ local orginLayer local orginLayer1 local orginLayer2 local list = {} -local tabsImg = {"z_icon_01_zh", "r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"} --初始化组件(用于子类重写) function this:InitComponent() this.spLoader = SpriteLoader.New() diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua index 4c1b24e521..952ebd0d56 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua @@ -471,7 +471,9 @@ function this.ShowCountTime() this.bgTime:SetActive(false) end else - this.actCountTime.text = GetTimeMaoHaoStrBySeconds(math.floor(leftTime)) + if not this.isPanelClose then + this.actCountTime.text = GetTimeMaoHaoStrBySeconds(math.floor(leftTime)) + end end end, 1, -1, true) this.timer:Start() diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index e68cee0dae..2c6d7dd335 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -412,6 +412,8 @@ function this:UpdateBtnList() else tabsList[k].gameObject:SetActive(true) end + local img = tabsList[k]:GetComponent("Image") + img.sprite = this.spLoader:LoadSprite("r_hero_xuanze_002") local title = Util.GetGameObject(tabsList[k], "Text"):GetComponent("Text") local redpot = Util.GetGameObject(tabsList[k], "redPoint") title.text = GetCurLanguage() == 0 and v.title or ""..v.title.."" @@ -479,6 +481,7 @@ function this:SetSelectBtn(index) this.selectBtn.transform:SetParent(tabsList[index].transform) this.selectBtn.transform.localScale = Vector3.one this.selectBtn.transform.localPosition=Vector3.zero + this.selectBtn:GetComponent.sprite = this.spLoader:LoadSprite("r_hero_xuanze_001") Util.GetGameObject(this.selectBtn.transform, "Text"):GetComponent("Text").text = GetCurLanguage() == 0 and tabs[index].title or ""..tabs[index].title..""--tabs[index].title-- Util.GetGameObject(self.transform,"talentBtn/tipStr"):SetActive(false) if index == 2 then diff --git a/Assets/ManagedResources/~Lua/View/BtView.lua b/Assets/ManagedResources/~Lua/View/BtView.lua index 527c27f728..0e6fb18d44 100644 --- a/Assets/ManagedResources/~Lua/View/BtView.lua +++ b/Assets/ManagedResources/~Lua/View/BtView.lua @@ -195,7 +195,7 @@ function this:OnBtnClick(pt) local isOpen = self:CheckIsOpen(pt) if isOpen then -- 关闭当前界面 - if self.rootPanel.uiConfig.id ~= UIName.FightPointPassMainPanel and (pt ~= PanelTypeView.GongHui or PlayerManager.familyId ~= 0) then + if pt ~= PanelTypeView.GongHui or PlayerManager.familyId ~= 0 then self.rootPanel:ClosePanel() end -- 打开新界面 diff --git a/Assets/ManagedResources/~Lua/View/UpView.lua b/Assets/ManagedResources/~Lua/View/UpView.lua index c2670d13ec..42ca10ff73 100644 --- a/Assets/ManagedResources/~Lua/View/UpView.lua +++ b/Assets/ManagedResources/~Lua/View/UpView.lua @@ -161,6 +161,7 @@ end -- 关闭界面时调用 function UpView:OnClose() + self.spLoader:Destroy() self:_ClearRP() if self.timer then