def _populate(self): super(MainView, self)._populate() self.__ctx = self.service.getCtx() self.__ctx.onCustomizationSeasonChanged += self.__onSeasonChanged self.__ctx.onCustomizationModeChanged += self.__onModeChanged self.__ctx.onCustomizationTabChanged += self.__onTabChanged self.__ctx.onCustomizationItemInstalled += self.__onItemsInstalled self.__ctx.onCustomizationItemsRemoved += self.__onItemsRemoved self.__ctx.onCustomizationItemsBought += self.__onItemsBought self.__ctx.onCacheResync += self.__onCacheResync self.__ctx.onChangesCanceled += self.__onChangesCanceled self.__ctx.onCaruselItemSelected += self.__onCarouselItemSelected self.__ctx.onPropertySheetHidden += self.__onPropertySheetHidden self.__ctx.onPropertySheetShown += self.__onPropertySheetShown self.__ctx.onClearItem += self.__onClearItem self.soundManager.playInstantSound(SOUNDS.ENTER) self.__viewLifecycleWatcher.start(self.app.containerManager, [ _ModalWindowsPopupHandler(), _C11ViewsPopupHandler(self.__hidePropertiesSheet) ]) self.lobbyContext.addHeaderNavigationConfirmator( self.__confirmHeaderNavigation) self.lobbyContext.getServerSettings( ).onServerSettingsChange += self.__onServerSettingChanged self.hangarSpace.onSpaceCreate += self.__onSpaceCreateHandler self.hangarSpace.onSpaceDestroy += self.__onSpaceDestroyHandler self.hangarSpace.onSpaceRefresh += self.__onSpaceRefreshHandler self.service.onRegionHighlighted += self.__onRegionHighlighted self._seasonSoundAnimantion = _SeasonSoundAnimantion( len(SeasonType.COMMON_SEASONS), self.soundManager) self.__setHeaderInitData() self.__setSeasonData() self.__ctx.refreshOutfit() self.as_selectSeasonS(SEASON_TYPE_TO_IDX[self.__ctx.currentSeason]) self.fireEvent( CameraRelatedEvents( CameraRelatedEvents.FORCE_DISABLE_IDLE_PARALAX_MOVEMENT, ctx={'isDisable': True}), EVENT_BUS_SCOPE.LOBBY) self.fireEvent( LobbyHeaderMenuEvent( LobbyHeaderMenuEvent.TOGGLE_VISIBILITY, ctx={'state': HeaderMenuVisibilityState.ONLINE_COUNTER}), EVENT_BUS_SCOPE.LOBBY) self._isPropertySheetShown = False if self.__ctx.c11CameraManager is not None: self.__ctx.c11CameraManager.locateCameraToCustomizationPreview( forceLocate=True) self.__renderEnv = BigWorld.CustomizationEnvironment() self.__renderEnv.enable(True) if self.__ctx.vehicleAnchorsUpdater is not None: self.__ctx.vehicleAnchorsUpdater.setMainView(self.flashObject) return
def _populate(self): super(MainView, self)._populate() self.__ctx = self.service.getCtx() self.__ctx.onCustomizationSeasonChanged += self.__onSeasonChanged self.__ctx.onCustomizationModeChanged += self.__onModeChanged self.__ctx.onCustomizationTabChanged += self.__onTabChanged self.__ctx.onCustomizationItemInstalled += self.__onItemsInstalled self.__ctx.onCustomizationItemsRemoved += self.__onItemsRemoved self.__ctx.onCustomizationItemsBought += self.__onItemsBought self.__ctx.onCacheResync += self.__onCacheResync self.__ctx.onChangesCanceled += self.__onChangesCanceled self.__ctx.onCaruselItemSelected += self.__onCaruselItemSelected self.__ctx.onPropertySheetHidden += self.__onPropertySheetHidden self.__ctx.onPropertySheetShown += self.__onPropertySheetShown self.soundManager.playInstantSound(SOUNDS.ENTER) self.__viewLifecycleWatcher.start(self.app.containerManager, [ _ModalWindowsPopupHandler(), _C11ViewsPopupHandler(self.__hidePropertiesSheet) ]) self.lobbyContext.addHeaderNavigationConfirmator( self.__confirmHeaderNavigation) self.lobbyContext.getServerSettings( ).onServerSettingsChange += self.__onServerSettingChanged g_eventBus.addListener(CameraRelatedEvents.IDLE_CAMERA, self.__onNotifyHangarCameraIdleStateChanged) self.hangarSpace.onSpaceCreate += self.__onSpaceCreateHandler self.hangarSpace.onSpaceDestroy += self.__onSpaceDestroyHandler self.hangarSpace.onSpaceRefresh += self.__onSpaceRefreshHandler self.service.onRegionHighlighted += self.__onRegionHighlighted self._seasonSoundAnimantion = _SeasonSoundAnimantion( len(SeasonType.COMMON_SEASONS), self.soundManager) self.__setHeaderInitData() self.__setSeasonData() self._vehicleCustomizationAnchorsUpdater = _VehicleCustomizationAnchorsUpdater( self.service) self._vehicleCustomizationAnchorsUpdater.startUpdater( self.settingsCore.interfaceScale.get()) self.__ctx.refreshOutfit() self.settingsCore.interfaceScale.onScaleExactlyChanged += self.__onInterfaceScaleChanged self.fireEvent( CameraRelatedEvents( CameraRelatedEvents.FORCE_DISABLE_IDLE_PARALAX_MOVEMENT, ctx={'isDisable': True}), EVENT_BUS_SCOPE.LOBBY) if self.hangarSpace.spaceInited: self.hangarSpace.space.locateCameraToCustomizationPreview() self.__renderEnv = BigWorld.CustomizationEnvironment() self.__renderEnv.enable(True) self._isPropertySheetShown = False