def _onLoading(self): self.__gui.windowsManager.onWindowStatusChanged += self.__windowStatusChanged self.__lobbyContext.addHeaderNavigationConfirmator( self.__handleHeaderNavigation) self.viewModel.onItemClicked += self.__itemClickHandler self.viewModel.onShowMapSelectionClicked += self.__showMapSelectionClickHandler self.viewModel.onShowWidgetsClicked += self.__showWidgetsClickHandler self.viewModel.onInfoClicked += self.__infoClickHandler self.__dataProvider.onListChanged += self.__dataProviderListChangeHandler self.__updateViewModel(self.viewModel) self.__blur = CachedBlur(enabled=True, ownLayer=WindowLayer.MARKER) g_eventBus.handleEvent(events.GameEvent( events.GameEvent.HIDE_LOBBY_SUB_CONTAINER_ITEMS), scope=EVENT_BUS_SCOPE.GLOBAL) g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={ 'state': HeaderMenuVisibilityState.NOTHING, 'alias': self.layoutID }), scope=EVENT_BUS_SCOPE.LOBBY) app = self.__appLoader.getApp() self.__prevAppBackgroundAlpha = app.getBackgroundAlpha() app.setBackgroundAlpha(_BACKGROUND_ALPHA) self.__prevOptimizationEnabled = app.graphicsOptimizationManager.getEnable( ) if self.__prevOptimizationEnabled: app.graphicsOptimizationManager.switchOptimizationEnabled(False)
def _onLoaded(self, *args, **kwargs): super(CrystalsPromoView, self)._onLoaded(*args, **kwargs) g_eventBus.handleEvent( events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.NOTHING}), EVENT_BUS_SCOPE.LOBBY)
def _initialize(self, *args, **kwargs): super(BrBattleResultsViewInLobby, self)._initialize(*args, **kwargs) BREvents.playSound(BREvents.BATTLE_SUMMARY_SHOW) g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.NOTHING}), scope=EVENT_BUS_SCOPE.LOBBY) event_dispatcher.hideSquadWindow()
def _initialize(self, *args, **kwargs): super(BrBattleResultsViewInLobby, self)._initialize(*args, **kwargs) self.viewModel.personalResults.battlePassProgress.onSubmitClick += self.__onBattlePassClick self.__brController.onUpdated += self.__updateBattlePass BREvents.playSound(BREvents.BATTLE_SUMMARY_SHOW) g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.NOTHING}), scope=EVENT_BUS_SCOPE.LOBBY) event_dispatcher.hideSquadWindow()
def _finalize(self): self.__destroyViewObject.fini() self.viewModel.goToShop -= self.__goToShopHandler self.__lobbyContext.getServerSettings( ).onServerSettingsChange -= self.__onServerSettingsChanged g_eventBus.handleEvent( events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': self.__visibility}), EVENT_BUS_SCOPE.LOBBY) super(CrystalsPromoView, self)._finalize()
def _finalize(self): BREvents.playSound(BREvents.BR_RESULT_PROGRESS_BAR_STOP) self.__tooltipsData = None self.__tooltipParametersCreator = None g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.ALL}), scope=EVENT_BUS_SCOPE.LOBBY) super(BrBattleResultsViewInLobby, self)._finalize() return
def _finalize(self): BREvents.playSound(BREvents.BR_RESULT_PROGRESS_BAR_STOP) SoundGroups.g_instance.playSound2D( backport.sound(R.sounds.bp_progress_bar_stop())) self.__tooltipsData = None self.__tooltipParametersCreator = None self.__data = None self.__brController.onUpdated -= self.__updateBattlePass self.viewModel.personalResults.battlePassProgress.onSubmitClick -= self.__onBattlePassClick g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.ALL}), scope=EVENT_BUS_SCOPE.LOBBY) super(BrBattleResultsViewInLobby, self)._finalize() return
def _initialize(self, *args, **kwargs): self.viewModel.onClose += self.__onCloseClick self.viewModel.onFadeInDone += self.__onFadeInDone self.viewModel.backButton.onBack += self.__onBackClicked self.__nyController.onStateChanged += self.__onStateChanged self.__settingsCore.onSettingsChanged += self.__onSettingsChanged g_eventBus.addListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED, self.__handleSelectedEntityUpdated, scope=EVENT_BUS_SCOPE.DEFAULT) g_eventBus.addListener(events.NewYearEvent.ON_PRE_SWITCH_VIEW, self.__onPreSwitchViewEvent, scope=EVENT_BUS_SCOPE.LOBBY) g_eventBus.handleEvent( events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.NOTHING}), EVENT_BUS_SCOPE.LOBBY)
def _finalize(self): if dependency.instance(IHangarSpace).spaceInited: BigWorld.worldDrawEnabled(True) self.__flowLogger.logFinalize(self.__ctx.menuName, self.currentPresenter.currentTab) self.viewModel.onClose -= self.__onCloseClick self.viewModel.onFadeInDone -= self.__onFadeInDone self.viewModel.backButton.onBack -= self.__onBackClicked self.__nyController.onStateChanged -= self.__onStateChanged self.__settingsCore.onSettingsChanged -= self.__onSettingsChanged self.__hangarSpace.setVehicleSelectable(False) g_eventBus.removeListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED, self.__handleSelectedEntityUpdated, scope=EVENT_BUS_SCOPE.DEFAULT) g_eventBus.removeListener(events.NewYearEvent.ON_PRE_SWITCH_VIEW, self.__onPreSwitchViewEvent, scope=EVENT_BUS_SCOPE.LOBBY) g_eventBus.removeListener(events.NewYearEvent.UPDATE_BACK_BUTTON, self.__onBackButtonUpdated, scope=EVENT_BUS_SCOPE.LOBBY) self.releaseGiftEventHub() g_eventBus.handleEvent( events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.ALL}), EVENT_BUS_SCOPE.LOBBY) for presenter in self.__componentPresenters: presenter.finalize() presenter.clear() self.__componentPresenters = [] self.currentPresenter.finalize() self.currentPresenter.clearTabCache() self.currentPresenter.clearNavigationHistory() if self.__regionName: uniprof.exitFromRegion(self.__regionName) for subModelInfo in self.__contentPresentersMap.itervalues(): subModelInfo.presenter.clear() self.__contentPresentersMap.clear() NewYearNavigation.clear() self.__backCallback = None return
def _finalize(self): self.uiBootcampLogger.logOnlyFromBootcamp(LOG_ACTIONS.CLOSED) self.__gui.windowsManager.onWindowStatusChanged -= self.__windowStatusChanged self.inputManager.removeEscapeListener(self.__handleEscape) self.__lobbyContext.deleteHeaderNavigationConfirmator( self.__handleHeaderNavigation) self.viewModel.onItemClicked -= self.__itemClickHandler self.viewModel.onShowMapSelectionClicked -= self.__showMapSelectionClickHandler self.viewModel.onShowWidgetsClicked -= self.__showWidgetsClickHandler self.viewModel.onInfoClicked -= self.__infoClickHandler saveBattlePassStateForItems(self.__dataProvider.itemList) self.__dataProvider.onListChanged -= self.__dataProviderListChangeHandler self.__dataProvider.dispose() g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.ALL}), scope=EVENT_BUS_SCOPE.LOBBY) g_eventBus.handleEvent( FullscreenModeSelectorEvent(FullscreenModeSelectorEvent.NAME, ctx={'showing': False})) g_eventBus.handleEvent(events.GameEvent( events.GameEvent.REVEAL_LOBBY_SUB_CONTAINER_ITEMS), scope=EVENT_BUS_SCOPE.GLOBAL) self.__restoreGraphics()
def _finalize(self): self.viewModel.goToShop -= self.__goToShopHandler self._lobbyContext.getServerSettings().onServerSettingsChange -= self.__onServerSettingsChanged g_eventBus.removeListener(events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, self.__onToggleVisibilityMenu, scope=EVENT_BUS_SCOPE.LOBBY) g_eventBus.handleEvent(events.HangarVehicleEvent(events.HangarVehicleEvent.HERO_TANK_MARKER, ctx={'isDisable': self.__isMarkerDisabled}), EVENT_BUS_SCOPE.LOBBY) g_eventBus.handleEvent(events.LobbyHeaderMenuEvent(events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': self.__visibility}), EVENT_BUS_SCOPE.LOBBY)
def _onLoaded(self, *args, **kwargs): g_eventBus.handleEvent(events.HangarVehicleEvent(events.HangarVehicleEvent.HERO_TANK_MARKER, ctx={'isDisable': True}), EVENT_BUS_SCOPE.LOBBY) g_eventBus.handleEvent(events.LobbyHeaderMenuEvent(events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.NOTHING}), EVENT_BUS_SCOPE.LOBBY) g_eventBus.addListener(events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, self.__onToggleVisibilityMenu, scope=EVENT_BUS_SCOPE.LOBBY)
def _showMenu(self): from gui.Scaleform.daapi.view.lobby.header.LobbyHeader import HeaderMenuVisibilityState g_eventBus.handleEvent(events.LobbyHeaderMenuEvent( events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.ALL}), scope=EVENT_BUS_SCOPE.LOBBY)