local UINoInputManager = BaseClass("UINoInputManager")
local __init = function(self)
  self:AddListener()
  self.uINoInputType = UINoInputType.Close
end
local __delete = function(self)
  self:RemoveListener()
  self.uINoInputType = nil
end
local Startup = function()
end
local AddListener = function(self)
  EventManager:GetInstance():AddListener(EventId.UINoInput, self.UINoInputSignal)
  EventManager:GetInstance():AddListener(EventId.SetMovingUI, self.UIMovingSignal)
  EventManager:GetInstance():AddListener(EventId.SetCrossMovingUI, self.UICrossMovingSignal)
  EventManager:GetInstance():AddListener(EventId.ScreenLoadingUI, self.UILoadingSignal)
end
local RemoveListener = function(self)
  EventManager:GetInstance():RemoveListener(EventId.UINoInput, self.UINoInputSignal)
  EventManager:GetInstance():RemoveListener(EventId.SetMovingUI, self.UIMovingSignal)
  EventManager:GetInstance():RemoveListener(EventId.SetCrossMovingUI, self.UICrossMovingSignal)
  EventManager:GetInstance():RemoveListener(EventId.ScreenLoadingUI, self.UILoadingSignal)
end
local UINoInputSignal = function(uINoInputType)
  DataCenter.UINoInputManager.uINoInputType = uINoInputType
  if uINoInputType == UINoInputType.ShowNoScene then
    if not UIManager:GetInstance():IsWindowOpen(UIWindowNames.UISceneNoInput) then
      UIManager:GetInstance():OpenWindow(UIWindowNames.UISceneNoInput, {anim = true, playEffect = false})
    else
      DataCenter.UINoInputManager:CloseWindow(UIWindowNames.UINoInput)
    end
  elseif uINoInputType == UINoInputType.ShowNoUI then
    if not UIManager:GetInstance():IsWindowOpen(UIWindowNames.UINoInput) then
      UIManager:GetInstance():OpenWindow(UIWindowNames.UINoInput, {anim = true, playEffect = false})
    end
  elseif uINoInputType == UINoInputType.Close then
    DataCenter.UINoInputManager:CloseWindow(UIWindowNames.UINoInput)
    DataCenter.UINoInputManager:CloseWindow(UIWindowNames.UISceneNoInput)
  end
end
local UIMovingSignal = function(uiMovingType)
  if uiMovingType == UIMovingType.Open then
    if not UIManager:GetInstance():IsWindowOpen(UIWindowNames.UIMoving) then
      UIManager:GetInstance():OpenWindow(UIWindowNames.UIMoving, {anim = true, playEffect = false})
    end
  elseif uiMovingType == UIMovingType.Close then
    UIManager:GetInstance():DestroyWindow(UIWindowNames.UIMoving, {
      anim = false,
      playEffect = false,
      UIMainAnim = UIMainAnimType.ChangeAllShow
    })
  end
end
local UICrossMovingSignal = function(serverId)
  if toInt(serverId) > 0 and not UIManager:GetInstance():IsWindowOpen(UIWindowNames.UIMoving) then
    UIManager:GetInstance():OpenWindow(UIWindowNames.UIMoving, {anim = true, playEffect = false}, serverId)
  end
end
local UILoadingSignal = function(openText)
  if openText then
    if not UIManager:GetInstance():IsWindowOpen(UIWindowNames.UIScreenLoading) then
      UIManager:GetInstance():OpenWindow(UIWindowNames.UIScreenLoading, {anim = true, playEffect = false}, openText)
    end
  else
    UIManager:GetInstance():DestroyWindow(UIWindowNames.UIScreenLoading, {
      anim = false,
      playEffect = false,
      UIMainAnim = UIMainAnimType.ChangeAllShow
    })
  end
end
local CloseWindow = function(self, windowName)
  if self.uINoInputType == UINoInputType.ShowNoScene and windowName == UIWindowNames.UISceneNoInput then
    return
  end
  UIManager:GetInstance():DestroyWindow(windowName)
end
UINoInputManager.__init = __init
UINoInputManager.__delete = __delete
UINoInputManager.Startup = Startup
UINoInputManager.AddListener = AddListener
UINoInputManager.RemoveListener = RemoveListener
UINoInputManager.UINoInputSignal = UINoInputSignal
UINoInputManager.CloseWindow = CloseWindow
UINoInputManager.UIMovingSignal = UIMovingSignal
UINoInputManager.UICrossMovingSignal = UICrossMovingSignal
UINoInputManager.UILoadingSignal = UILoadingSignal
return UINoInputManager
