def __init__(self, swfName, appNS, daapiBridge = None):
     super(SFApplication, self).__init__(swfName, path=SCALEFORM_SWF_PATH_V3)
     self.proxy = weakref.proxy(self)
     self._loaderMgr = None
     self._containerMgr = None
     self._toolTip = None
     self._varsMgr = None
     self._soundMgr = None
     self._colorSchemeMgr = None
     self._eventLogMgr = None
     self._contextMgr = None
     self._popoverManager = None
     self._voiceChatMgr = None
     self._utilsMgr = None
     self._tweenMgr = None
     self._gameInputMgr = None
     self._cacheMgr = None
     self._tutorialMgr = None
     self._imageManager = None
     self.__initialized = False
     self.__ns = appNS
     self.__firingsAfterInit = {}
     self.__guiCtrlModeFlags = GUI_CTRL_MODE_FLAG.CURSOR_DETACHED
     self.__aliasToLoad = []
     self.__daapiBridge = daapiBridge or DAAPIRootBridge()
     self.__daapiBridge.setPyScript(self.proxy)
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.CREATING))
     return
 def __init__(self, userWndFlags, swfName, appNS, daapiBridge=None):
     super(AppEntry, self).__init__(swfName, path=SCALEFORM_SWF_PATH_V3)
     self.proxy = weakref.proxy(self)
     self._loaderMgr = None
     self._containerMgr = None
     self._toolTip = None
     self._varsMgr = None
     self._soundMgr = None
     self._colorSchemeMgr = None
     self._eventLogMgr = None
     self._contextMgr = None
     self._popoverManager = None
     self._voiceChatMgr = None
     self._utilsMgr = None
     self._tweenMgr = None
     self._gameInputMgr = None
     self._cacheMgr = None
     self._tutorialMgr = None
     self._imageManager = None
     self._graphicsOptimizationMgr = None
     self.__initialized = False
     self.__ns = appNS
     self.__viewEventsListener = ViewEventsListener(weakref.proxy(self))
     self.__viewEventsListener.create()
     self.__firingsAfterInit = {}
     self.__guiCtrlModeFlags = GUI_CTRL_MODE_FLAG.CURSOR_DETACHED
     self.__daapiBridge = daapiBridge or DAAPIRootBridge()
     self.__daapiBridge.setPyScript(self.proxy)
     self.__mainWnd = MainWindow(userWndFlags, None)
     self.__mainWnd.load()
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.CREATING))
     return
 def __init__(self, entryID, appNS, ctrlModeFlag, daapiBridge=None):
     super(AppEntry, self).__init__()
     self.proxy = weakref.proxy(self)
     self._loaderMgr = None
     self._containerMgr = None
     self._toolTip = None
     self._varsMgr = None
     self._soundMgr = None
     self._colorSchemeMgr = None
     self._eventLogMgr = None
     self._contextMgr = None
     self._popoverManager = None
     self._voiceChatMgr = None
     self._utilsMgr = None
     self._tweenMgr = None
     self._gameInputMgr = None
     self._cacheMgr = None
     self._tutorialMgr = None
     self._imageManager = None
     self._graphicsOptimizationMgr = None
     self._cursorMgr = None
     self.__initialized = False
     self.__ns = appNS
     self.__viewEventsListener = ViewEventsListener(weakref.proxy(self))
     self.__viewEventsListener.create()
     self.__firingsAfterInit = {}
     self.__guiCtrlModeFlags = ctrlModeFlag
     self.__daapiBridge = daapiBridge or DAAPIRootBridge()
     self.__daapiBridge.setPyScript(self.proxy)
     self.fireEvent(AppLifeCycleEvent(self.__ns,
                                      AppLifeCycleEvent.CREATING))
     self.__mainWnd = MainWindow(entryID)
     self.__mainWnd.onStatusChanged += self.__onMainWindowStatusChanged
     self.__mainWnd.load()
     return
 def beforeDelete(self):
     LOG_DEBUG('[SFApplication] beforeDelete', self.__ns)
     self.__viewEventsListener.destroy()
     self.removeListener(GameEvent.CHANGE_APP_RESOLUTION, self.__onAppResolutionChanged, scope=EVENT_BUS_SCOPE.GLOBAL)
     self._removeGameCallbacks()
     if self._containerMgr is not None:
         self._containerMgr.destroy()
         self._containerMgr = None
     if self._loaderMgr is not None:
         self._loaderMgr.destroy()
         self._loaderMgr = None
     if self._cacheMgr is not None:
         self._cacheMgr.destroy()
         self._cacheMgr = None
     if self._contextMgr is not None:
         self._contextMgr.destroy()
         self._contextMgr = None
     if self._popoverManager is not None:
         self._popoverManager.destroy()
         self._popoverManager = None
     if self._soundMgr is not None:
         self._soundMgr.destroy()
         self._soundMgr = None
     if self._varsMgr is not None:
         self._varsMgr.destroy()
         self._varsMgr = None
     if self._toolTip is not None:
         self._toolTip.destroy()
         self._toolTip = None
     if self._colorSchemeMgr is not None:
         self._colorSchemeMgr.destroy()
         self._colorSchemeMgr = None
     if self._eventLogMgr is not None:
         self._eventLogMgr.destroy()
         self._eventLogMgr = None
     if self._tweenMgr is not None:
         self._tweenMgr.destroy()
         self._tweenMgr = None
     if self._voiceChatMgr is not None:
         self._voiceChatMgr.destroy()
         self._voiceChatMgr = None
     if self._gameInputMgr is not None:
         self._gameInputMgr.destroy()
         self._gameInputMgr = None
     if self._utilsMgr is not None:
         self._utilsMgr.destroy()
         self._utilsMgr = None
     if self._tutorialMgr is not None:
         self._tutorialMgr.destroy()
         self._tutorialMgr = None
     if self.__daapiBridge is not None:
         self.__daapiBridge.clear()
         self.__daapiBridge = None
     if self._imageManager is not None:
         self._imageManager.destroy()
         self._imageManager = None
     super(SFApplication, self).beforeDelete()
     self.proxy = None
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.DESTROYED))
     return
Exemple #5
0
 def afterCreate(self):
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.INITIALIZING))
     LOG_DEBUG('[SFApplication] afterCreate', self.__ns)
     super(SFApplication, self).afterCreate()
     self._createManagers()
     self.as_registerManagersS()
     libraries = self._getRequiredLibraries()
     if libraries:
         self.as_loadLibrariesS(libraries)
     self._addGameCallbacks()
     self.addListener(GameEvent.CHANGE_APP_RESOLUTION, self.__onAppResolutionChanged, scope=EVENT_BUS_SCOPE.GLOBAL)
     self.updateScale()
     self.__viewEventsListener.handleWaitingEvents()
     self._loadCursor()
     self._loadWaiting()
 def afterCreate(self):
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.INITIALIZING))
     _logger.debug('AppEntry.afterCreate: %s', self.__ns)
     super(AppEntry, self).afterCreate()
     self._createManagers()
     self.as_registerManagersS()
     libraries = self._getRequiredLibraries()
     if libraries:
         self.as_loadLibrariesS(libraries)
     self._addGameCallbacks()
     self.addListener(GameEvent.CHANGE_APP_RESOLUTION, self.__onAppResolutionChanged, scope=EVENT_BUS_SCOPE.GLOBAL)
     self.updateScale()
     self.__viewEventsListener.handleWaitingEvents()
     self._loadCursor()
     self._loadWaiting()
     self.connectionMgr.onDisconnected += self.__cm_onDisconnected
Exemple #7
0
    def afterCreate(self):
        self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.INITIALIZING))
        LOG_DEBUG('[SFApplication] afterCreate', self.__ns)
        super(SFApplication, self).afterCreate()
        self._createManagers()
        self.as_registerManagersS()
        libraries = self._getRequiredLibraries()
        if libraries:
            self.as_setLibrariesListS(libraries)
        self._addGameCallbacks()
        self.addListener(GameEvent.CHANGE_APP_RESOLUTION, self.__onAppResolutionChanged, scope=EVENT_BUS_SCOPE.GLOBAL)
        self.updateScale()
        while len(self.__aliasToLoad):
            alias, name, args, kwargs = self.__aliasToLoad.pop(0)
            self.loadView(alias, name, *args, **kwargs)

        self._loadCursor()
        self._loadWaiting()
Exemple #8
0
    def afterCreate(self):
        self.fireEvent(
            AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.INITIALIZING))
        LOG_DEBUG('[App] afterCreate')
        AppBase.afterCreate(self)
        self._createManagers()
        self.__validateManagers()
        self.as_registerManagersS()
        self.as_setLibrariesListS(self.prepareLibrariesList())
        g_guiResetters.add(self.onUpdateStage)
        self.onUpdateStage()
        g_repeatKeyHandlers.add(self.component.handleKeyEvent)
        while len(self.__aliasToLoad):
            alias, name, args, kwargs = self.__aliasToLoad.pop(0)
            self.loadView(alias, name, *args, **kwargs)

        self._loadCursor()
        self._loadWaiting()
        from gui.Scaleform.Waiting import Waiting
        Waiting.setWainingViewGetter(self.__getWaitingFromContainer)
        self.__geShowed = False
 def onAsInitializationCompleted(self):
     self.__initialized = True
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.INITIALIZED))
 def beforeDelete(self):
     _logger.debug('AppEntry.beforeDelete: %s', self.__ns)
     self.__viewEventsListener.destroy()
     self.removeListener(GameEvent.CHANGE_APP_RESOLUTION, self.__onAppResolutionChanged, scope=EVENT_BUS_SCOPE.GLOBAL)
     self._removeGameCallbacks()
     if self._containerMgr is not None:
         self._containerMgr.destroy()
         self._containerMgr = None
     if self._loaderMgr is not None:
         self._loaderMgr.destroy()
         self._loaderMgr = None
     if self._cacheMgr is not None:
         self._cacheMgr.destroy()
         self._cacheMgr = None
     if self._contextMgr is not None:
         self._contextMgr.destroy()
         self._contextMgr = None
     if self._popoverManager is not None:
         self._popoverManager.destroy()
         self._popoverManager = None
     if self._soundMgr is not None:
         self._soundMgr.destroy()
         self._soundMgr = None
     if self._varsMgr is not None:
         self._varsMgr.destroy()
         self._varsMgr = None
     if self._toolTip is not None:
         self._toolTip.destroy()
         self._toolTip = None
     if self._colorSchemeMgr is not None:
         self._colorSchemeMgr.destroy()
         self._colorSchemeMgr = None
     if self._eventLogMgr is not None:
         self._eventLogMgr.destroy()
         self._eventLogMgr = None
     if self._tweenMgr is not None:
         self._tweenMgr.destroy()
         self._tweenMgr = None
     if self._voiceChatMgr is not None:
         self._voiceChatMgr.destroy()
         self._voiceChatMgr = None
     if self._gameInputMgr is not None:
         self._gameInputMgr.destroy()
         self._gameInputMgr = None
     if self._utilsMgr is not None:
         self._utilsMgr.destroy()
         self._utilsMgr = None
     if self._tutorialMgr is not None:
         self._tutorialMgr.destroy()
         self._tutorialMgr = None
     if self.__daapiBridge is not None:
         self.__daapiBridge.clear()
         self.__daapiBridge = None
     if self._imageManager is not None:
         self._imageManager.destroy()
         self._imageManager = None
     if self._graphicsOptimizationMgr is not None:
         self._graphicsOptimizationMgr.destroy()
         self._graphicsOptimizationMgr = None
     if self.__mainWnd is not None:
         self.__mainWnd.destroy()
         self.__mainWnd = None
     super(AppEntry, self).beforeDelete()
     self.proxy = None
     self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.DESTROYED))
     self.connectionMgr.onDisconnected -= self.__cm_onDisconnected
     return
Exemple #11
0
 def beforeDelete(self):
     LOG_DEBUG('[App] beforeDelete')
     from gui.Scaleform.Waiting import Waiting
     Waiting.setWainingViewGetter(None)
     g_guiResetters.discard(self.onUpdateStage)
     g_repeatKeyHandlers.discard(self.component.handleKeyEvent)
     if self._containerMgr is not None:
         self._containerMgr.destroy()
         self._containerMgr = None
     if self._loaderMgr is not None:
         self._loaderMgr.destroy()
         self._loaderMgr = None
     if self._cacheMgr is not None:
         self._cacheMgr.destroy()
         self._cacheMgr = None
     if self._contextMgr is not None:
         self._contextMgr.destroy()
         self._contextMgr = None
     if self._popoverManager is not None:
         self._popoverManager.destroy()
         self._popoverManager = None
     if self._soundMgr is not None:
         self._soundMgr.destroy()
         self._soundMgr = None
     if self._varsMgr is not None:
         self._varsMgr.destroy()
         self._varsMgr = None
     if self.__toolTip is not None:
         self.__toolTip.destroy()
         self.__toolTip = None
     if self._colorSchemeMgr is not None:
         self._colorSchemeMgr.destroy()
         self._colorSchemeMgr = None
     if self._eventLogMgr is not None:
         self._eventLogMgr.destroy()
         self._eventLogMgr = None
     if self._guiItemsMgr is not None:
         self._guiItemsMgr.destroy()
         self._guiItemsMgr = None
     if self._tweenMgr is not None:
         self._tweenMgr.destroy()
         self._tweenMgr = None
     if self._voiceChatMgr is not None:
         self._voiceChatMgr.destroy()
         self._voiceChatMgr = None
     if self._gameInputMgr is not None:
         self._gameInputMgr.destroy()
         self._gameInputMgr = None
     if self._utilsMgr is not None:
         self._utilsMgr.destroy()
         self._utilsMgr = None
     if self._tutorialMgr is not None:
         self._tutorialMgr.destroy()
         self._tutorialMgr = None
     if self._businessHandler is not None:
         self._businessHandler.destroy()
         self._businessHandler = None
     self._dispose()
     super(App, self).beforeDelete()
     self.fireEvent(
         AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.DESTROYED))