Example #1
0
 def cleanUp(self):
     self.removeListener(VIEW_ALIAS.LOBBY_HANGAR,
                         self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_INVENTORY,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_SHOP, self.__onSomeViewSelected,
                         EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_PROFILE,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_TECHTREE,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_RESEARCH,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_BARRACKS,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_CUSTOMIZATION,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.BATTLE_QUEUE, self.__onSomeViewSelected,
                         EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.BATTLE_LOADING,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.TUTORIAL_LOADING,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY,
                         self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LobbySimpleEvent.HIDE_HANGAR,
                         self.__onHideHangarHandler)
     BaseMessagesController.cleanUp(self)
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     app = g_appLoader.getDefLobbyApp()
     isViewAvailable = app.containerManager.isViewAvailable(ViewTypes.LOBBY_SUB)
     isNowCustomizationLoading = False
     if isViewAvailable:
         view = app.containerManager.getView(ViewTypes.LOBBY_SUB)
         isNowHangarLoading = view.settings.alias == VIEW_ALIAS.LOBBY_HANGAR
         isNowCustomizationLoading = view.settings.alias == VIEW_ALIAS.LOBBY_CUSTOMIZATION
     else:
         isNowHangarLoading = app.loaderManager.isViewLoading(VIEW_ALIAS.LOBBY_HANGAR)
     if isNowHangarLoading:
         self.__onHangarViewSelected({})
     elif isNowCustomizationLoading:
         self.__onCustomizationViewSelected({})
     else:
         self.__onSomeViewSelected({})
     self.addListener(VIEW_ALIAS.LOBBY_HANGAR, self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_INVENTORY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_STORE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_PROFILE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_TECHTREE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_RESEARCH, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_BARRACKS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.BATTLE_QUEUE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.BATTLE_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.TUTORIAL_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_CUSTOMIZATION, self.__onCustomizationViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LobbySimpleEvent.HIDE_HANGAR, self.__onHideHangarHandler)
Example #3
0
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     isViewAvailable = self.app.containerManager.isViewAvailable(ViewTypes.LOBBY_SUB)
     if isViewAvailable:
         view = self.app.containerManager.getView(ViewTypes.LOBBY_SUB)
         isNowHangarLoading = view.settings.alias == VIEW_ALIAS.LOBBY_HANGAR
     else:
         isNowHangarLoading = self.app.loaderManager.isViewLoading(VIEW_ALIAS.LOBBY_HANGAR)
     if isNowHangarLoading:
         self.__onHangarViewSelected({})
     else:
         self.__onSomeViewSelected({})
     self.addListener(VIEW_ALIAS.LOBBY_HANGAR, self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_INVENTORY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_SHOP, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_PROFILE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_TECHTREE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_RESEARCH, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_BARRACKS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_CUSTOMIZATION, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.BATTLE_QUEUE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.BATTLE_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.TUTORIAL_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
Example #4
0
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     isViewAvailable = self.app.containerManager.isViewAvailable(VIEW_TYPE.LOBBY_SUB)
     if isViewAvailable:
         view = self.app.containerManager.getView(VIEW_TYPE.LOBBY_SUB)
         isNowHangarLoading = view.settings.alias == VIEW_ALIAS.LOBBY_HANGAR
     else:
         isNowHangarLoading = self.app.loaderManager.isViewLoading(VIEW_ALIAS.LOBBY_HANGAR)
     if isNowHangarLoading:
         self.__onHangarViewSelected({})
     else:
         self.__onSomeViewSelected({})
     self.addListener(LoadEvent.LOAD_HANGAR, self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_INVENTORY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_SHOP, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_PROFILE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_TECHTREE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_RESEARCH, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_BARRACKS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_CUSTOMIZATION, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_BATTLE_QUEUE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_BATTLE_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_TUTORIAL_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_TRAININGS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LoadEvent.LOAD_TRAINING_ROOM, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
Example #5
0
 def cleanUp(self):
     self.removeListener(VIEW_ALIAS.LOBBY_HANGAR, self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_INVENTORY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_SHOP, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_PROFILE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_TECHTREE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_RESEARCH, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_BARRACKS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.LOBBY_CUSTOMIZATION, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.BATTLE_QUEUE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.BATTLE_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(VIEW_ALIAS.TUTORIAL_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     BaseMessagesController.cleanUp(self)
 def cleanUp(self):
     self.removeListener(LoadEvent.LOAD_HANGAR, self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_INVENTORY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_SHOP, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_PROFILE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TECHTREE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_RESEARCH, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_BARRACKS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_CUSTOMIZATION, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_BATTLE_QUEUE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_BATTLE_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TUTORIAL_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TRAININGS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TRAINING_ROOM, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     BaseMessagesController.cleanUp(self)
Example #7
0
 def cleanUp(self):
     self.removeListener(LoadEvent.LOAD_HANGAR, self.__onHangarViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_INVENTORY, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_SHOP, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_PROFILE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TECHTREE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_RESEARCH, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_BARRACKS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_CUSTOMIZATION, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_BATTLE_QUEUE, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_BATTLE_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TUTORIAL_LOADING, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TRAININGS, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.removeListener(LoadEvent.LOAD_TRAINING_ROOM, self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     BaseMessagesController.cleanUp(self)
Example #8
0
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     app = g_appLoader.getDefLobbyApp()
     isViewAvailable = app.containerManager.isViewAvailable(
         ViewTypes.LOBBY_SUB)
     isNowCustomizationLoading = False
     if isViewAvailable:
         view = app.containerManager.getView(ViewTypes.LOBBY_SUB)
         isNowHangarLoading = view.settings.alias == VIEW_ALIAS.LOBBY_HANGAR
         isNowCustomizationLoading = view.settings.alias == VIEW_ALIAS.LOBBY_CUSTOMIZATION
     else:
         isNowHangarLoading = app.loaderManager.isViewLoading(
             VIEW_ALIAS.LOBBY_HANGAR)
     if isNowHangarLoading:
         self.__onHangarViewSelected({})
     elif isNowCustomizationLoading:
         self.__onCustomizationViewSelected({})
     else:
         self.__onSomeViewSelected({})
     self.addListener(VIEW_ALIAS.LOBBY_HANGAR, self.__onHangarViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_INVENTORY, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_STORE, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_PROFILE, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_TECHTREE, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_RESEARCH, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_BARRACKS, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.BATTLE_QUEUE, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.BATTLE_LOADING, self.__onSomeViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.TUTORIAL_LOADING,
                      self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(VIEW_ALIAS.LOBBY_CUSTOMIZATION,
                      self.__onCustomizationViewSelected,
                      EVENT_BUS_SCOPE.LOBBY)
     self.addListener(PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY,
                      self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY,
                      self.__onSomeViewSelected, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(LobbySimpleEvent.HIDE_HANGAR,
                      self.__onHideHangarHandler)
Example #9
0
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     self.__actualDisplayingAlerts = 0
     self.onAllAlertsClosed = Event.Event()
Example #10
0
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     self.__actualDisplayingAlerts = 0
     self.onAllAlertsClosed = Event.Event()
Example #11
0
 def __init__(self, model):
     BaseMessagesController.__init__(self, model)
     self._model.onDisplayStateChanged += self.__displayStateChangeHandler