From b740f2abb720a0f5ab9f3024b99a154e23eefc30 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 6 Jan 2022 18:25:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A2=E7=B4=A2=E5=BC=95=E5=AF=BC=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Explore/ExploreMainPanel.lua | 1 + .../~Lua/Modules/Guide/GuidePanel.lua | 2 +- .../~Lua/Modules/Main/MainPanel.lua | 33 +++++++++++-------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua index ec693df38a..60d4c4ca4a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua @@ -159,6 +159,7 @@ function ExploreMainPanel:SetMapData() if not self.mapList[k] then self.mapList[k] = {} self.mapList[k].go = newObjToParent(self.mapPre,self.mapParent) + self.mapList[k].go.name = "mapPre"..k self.mapList[k].mapBg = Util.GetGameObject(self.mapList[k].go,"mapBg") self.mapList[k].mapBgIma = Util.GetGameObject(self.mapList[k].mapBg,"ImgBg"):GetComponent("Image") self.mapList[k].mapInfo = Util.GetGameObject(self.mapList[k].go,"mapInfo") diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index 0da4995856..cef626f162 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -154,7 +154,7 @@ function this.ExecuteBehavior(beType, beArgs) this.button:GetComponent("Button").onClick:RemoveAllListeners() Util.AddClick(this.button, this.NextGuide) end) - if UIManager.IsOpen(UIName.MainPanel) and (string.find(btn.transform.parent.name, "layer") ~= nil or btn.transform.name == "btnXingYunTanBao") then --主界面的ui按钮位置可能会超框,所以做位移处理 + if UIManager.IsOpen(UIName.MainPanel) and (string.find(btn.transform.parent.name, "layer") ~= nil or btn.transform.name == "btnXingYunTanBao" or btn.transform.name == "btnExplore") then --主界面的ui按钮位置可能会超框,所以做位移处理 for k, v in pairs(MainPanel.operateIcon) do if v.go == btn.gameObject then MainPanel:SetPosFunc(Vector2.New(v.pos, 0)) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index c73ce85d1b..b1b00cfb9f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -178,6 +178,7 @@ function this:InitComponent() [FUNCTION_OPEN_TYPE.tianshumijuan] = this:AddFuncItem(this.btnTianShuMiJuan, -600), [FUNCTION_OPEN_TYPE.LUCKYTURN] = this:AddFuncItem(this.btnXingYunTanBao, 0),--幸运探宝 [FUNCTION_OPEN_TYPE.JumpServer] = this:AddFuncItem(this.btnJumpServer, 0),--跨服 + [FUNCTION_OPEN_TYPE.Explore] = this:AddFuncItem(this.btnExplore, 0),--探索 } this.operateNewText = { @@ -1289,25 +1290,29 @@ function this.InitFuncShow(funcType) end --(百宝斋,点将台,锻器阁,化虚坛,竞技场,四元阵,灵兽山,送神祠,万象境) if funcType then - if this.operateIcon[funcType] then - local isOpen = ActTimeCtrlManager.SingleFuncState(funcType) - if funcType == FUNCTION_OPEN_TYPE.ENDLESS then - isOpen = ActTimeCtrlManager.IsQualifiled(funcType) + if funcType ~= FUNCTION_OPEN_TYPE.Explore then + if this.operateIcon[funcType] then + local isOpen = ActTimeCtrlManager.SingleFuncState(funcType) + if funcType == FUNCTION_OPEN_TYPE.ENDLESS then + isOpen = ActTimeCtrlManager.IsQualifiled(funcType) + end + Util.SetColor(this.operateIcon[funcType].lock, Color.New(1, 1, 1, 0.59)) + this.operateIcon[funcType].lock:SetActive(not isOpen) + this.operateIcon[funcType].open:SetActive(isOpen) + return end - Util.SetColor(this.operateIcon[funcType].lock, Color.New(1, 1, 1, 0.59)) - this.operateIcon[funcType].lock:SetActive(not isOpen) - this.operateIcon[funcType].open:SetActive(isOpen) - return end else for i, v in pairs(this.operateIcon) do - local isOpen = ActTimeCtrlManager.SingleFuncState(i) - if i == FUNCTION_OPEN_TYPE.ENDLESS then - isOpen = ActTimeCtrlManager.IsQualifiled(i) + if funcType ~= FUNCTION_OPEN_TYPE.Explore then + local isOpen = ActTimeCtrlManager.SingleFuncState(i) + if i == FUNCTION_OPEN_TYPE.ENDLESS then + isOpen = ActTimeCtrlManager.IsQualifiled(i) + end + v.lock:SetActive(not isOpen) + Util.SetColor(v.lock, Color.New(1, 1, 1, 0.59)) + v.open:SetActive(isOpen) end - v.lock:SetActive(not isOpen) - Util.SetColor(v.lock, Color.New(1, 1, 1, 0.59)) - v.open:SetActive(isOpen) end end