Exemplo n.º 1
0
def _detectCurrentScreen():
    global _isConnecting
    if Waiting.isVisible():
        BigWorld.callback(0.2, lambda : _detectCurrentScreen())
        return
    if g_windowsManager.window is None or g_windowsManager.window.containerManager is None:
        BigWorld.callback(0.2, lambda : _detectCurrentScreen())
        return
    dialogsContainer = g_windowsManager.window.containerManager.getContainer(ViewTypes.TOP_WINDOW)
    if dialogsContainer is not None:
        dialog = dialogsContainer.getView(criteria={POP_UP_CRITERIA.VIEW_ALIAS: VIEW_ALIAS.EULA})
        if dialog is not None:
            dialog.onApply()
        dialog = dialogsContainer.getView(criteria={POP_UP_CRITERIA.VIEW_ALIAS: 'tGreetingDialog'})
        if dialog is not None:
            dialog.cancel()
    view = g_windowsManager.window.containerManager.getView(ViewTypes.DEFAULT)
    if view and view.settings.alias == VIEW_ALIAS.LOGIN and view._isCreated() and connectionManager.isDisconnected() and not _isConnecting:
        _isConnecting = True
        _connect()
        BigWorld.callback(0.2, lambda : _detectCurrentScreen())
        return
    view = g_windowsManager.window.containerManager.getView(ViewTypes.DEFAULT)
    if view is not None and view.settings.alias == 'lobby':
        if _justLogin:
            return
        subView = g_windowsManager.window.containerManager.getView(ViewTypes.LOBBY_SUB)
        if subView.settings.alias == 'hangar':
            _leaveDevRoom()
            BigWorld.callback(0.2, lambda : _detectCurrentScreen())
            return
        if subView.settings.alias == 'trainingRoom':
            _enterBattle()
            return
    BigWorld.callback(0.2, lambda : _detectCurrentScreen())
Exemplo n.º 2
0
 def isRunning(self):
     app = g_appLoader.getApp()
     if app:
         from gui.Scaleform.daapi.settings.views import VIEW_ALIAS
         view = app.containerManager.getView(ViewTypes.DEFAULT)
         if view and view.settings.alias == VIEW_ALIAS.LOGIN and view._isCreated(
         ) and connectionManager.isDisconnected():
             LOG_DEBUG('Disconnect action. Player came to login')
             self._completed = True
             self._running = False
     return self._running
Exemplo n.º 3
0
 def isRunning(self):
     app = g_appLoader.getApp()
     if app:
         from gui.Scaleform.daapi.settings.views import VIEW_ALIAS
         view = app.containerManager.getView(ViewTypes.DEFAULT)
         if view and view.settings.alias == VIEW_ALIAS.LOGIN and view._isCreated() and connectionManager.isDisconnected():
             LOG_DEBUG('Disconnect action. Player came to login')
             self._completed = True
             self._running = False
     return self._running
Exemplo n.º 4
0
 def isRunning(self):
     view = self.app.containerManager.getView(VIEW_TYPE.DEFAULT)
     if view and view.settings.alias == VIEW_ALIAS.LOGIN and view._isCreated() and connectionManager.isDisconnected():
         LOG_DEBUG('Disconnect action. Player came to login')
         self._completed = True
         self._running = False
     return self._running