【ui】修复跳转后导致tip报错
parent
80a2b1a1f3
commit
12856c1287
|
|
@ -708,6 +708,22 @@ function UIManager.CloseAll(isDestroy)
|
|||
delayDestoryList = {}
|
||||
end
|
||||
|
||||
function UIManager.CloseAllStack(isDestroy)
|
||||
local panel = nil
|
||||
while(#this.stackList~=0)
|
||||
do
|
||||
panel = this.stackList[1]
|
||||
panel.gameObject:SetActive(false)
|
||||
panel:CloseUI()
|
||||
if(isDestroy) then
|
||||
this.DestroyPanel(panel)
|
||||
end
|
||||
table.remove(this.stackList,1)
|
||||
this.openedList[panel.uiConfig.id] = nil
|
||||
delayDestoryList[panel.uiConfig.id] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--延时销毁界面,避免频繁的GC开销
|
||||
function UIManager.DelayDestroyPanel(panel)
|
||||
local item = delayDestoryList[panel.uiConfig.id]
|
||||
|
|
|
|||
|
|
@ -58,11 +58,15 @@ function EndLessCarbonPanel:BindEvent()
|
|||
-- 如果只是关闭自己,则会打开地图界面,不会打开副本选择界面,导致报错
|
||||
PlayerManager.carbonType = 1
|
||||
UIManager.OpenPanel(UIName.MainPanel)
|
||||
|
||||
--检测到上一个面板打开之后,关闭自己
|
||||
CallBackOnPanelOpen(UIName.CarbonTypePanelV2, function()
|
||||
UIManager.ClosePanel(UIName.EndLessCarbonPanel)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
|
||||
UIManager.OpenPanel(UIName.EndLessCarbonPanel)
|
||||
-- CallBackOnPanelOpen(UIName.MainPanel, function()
|
||||
-- --检测到上一个面板打开之后,关闭自己
|
||||
-- CallBackOnPanelOpen(UIName.CarbonTypePanelV2, function()
|
||||
-- UIManager.ClosePanel(UIName.EndLessCarbonPanel)
|
||||
-- end)
|
||||
-- UIManager.OpenPanel(UIName.CarbonTypePanelV2)
|
||||
-- end)
|
||||
CarbonManager.difficulty = 0
|
||||
end)
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,10 @@ function this.BackHome()
|
|||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, triggerCallBack)
|
||||
-- 清空一下副本任务
|
||||
MissionManager.carBonMission = {}
|
||||
SwitchPanel.OpenPanel(UIName.MainPanel)
|
||||
SwitchPanel.ClosePanel(UIName.MainPanel, function()
|
||||
UIManager.CloseAllStack(true)
|
||||
UIManager.OpenPanel(UIName.MainPanel)
|
||||
end)
|
||||
poolManager:ClearPool()
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ function PopupTipPanel:RemoveListener()
|
|||
|
||||
end
|
||||
|
||||
function PopupTipPanel:OnDestroy()
|
||||
itemListPrefab:Clear()
|
||||
colorItemPrefab:Clear()
|
||||
end
|
||||
|
||||
--关闭弹出信息
|
||||
function PopupTipPanel.CloseTip()
|
||||
PopupTipPanel:ClosePanel()
|
||||
|
|
|
|||
|
|
@ -212,13 +212,13 @@ local jumpDic = {
|
|||
end
|
||||
end,
|
||||
[JumpType.MemberCamp] = function()--成员
|
||||
UIManager.CloseAll(true)
|
||||
UIManager.CloseAllStack(true)
|
||||
HeroManager.heroListPanelSortID = 1
|
||||
HeroManager.heroListPanelProID = 0
|
||||
UIManager.OpenPanel(UIName.RoleListPanel)
|
||||
end,
|
||||
[JumpType.StoreHouse] = function(data)--仓库
|
||||
UIManager.CloseAll(true)
|
||||
UIManager.CloseAllStack(true)
|
||||
if data then
|
||||
local openPanle = UIManager.OpenPanel(UIName.BagPanel,data[1])
|
||||
if openPanle then
|
||||
|
|
@ -243,7 +243,7 @@ local jumpDic = {
|
|||
end,
|
||||
[JumpType.Level] = function(data)--关卡
|
||||
|
||||
UIManager.CloseAll(true)
|
||||
UIManager.CloseAllStack(true)
|
||||
local openPanle
|
||||
openPanle = UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||
if openPanle then
|
||||
|
|
@ -327,7 +327,7 @@ local jumpDic = {
|
|||
end
|
||||
end,
|
||||
[JumpType.Privilege] = function(data)--特权
|
||||
UIManager.CloseAll(true)
|
||||
UIManager.CloseAllStack(true)
|
||||
local openPanle = UIManager.OpenPanel(UIName.VipPanelV2)
|
||||
if openPanle and data and data[1] < 0 then
|
||||
--引导光圈 -1 下边条目领取按钮
|
||||
|
|
@ -422,7 +422,7 @@ local jumpDic = {
|
|||
UIManager.OpenPanel(UIName.GuildFindPopup)
|
||||
else
|
||||
|
||||
UIManager.CloseAll(true)
|
||||
UIManager.CloseAllStack(true)
|
||||
if UIManager.IsOpen(UIName.GuildMainCityPanel) then
|
||||
UIManager.OpenPanel(UIName.GuildAidMainPopup,data[1])
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue