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 _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 setVisible(self, visible):
     eventName = BREvents.UPGRADE_PANEL_SHOW if visible else BREvents.UPGRADE_PANEL_HIDE
     BREvents.playSound(eventName)
     if visible:
         if self.__callbackID is not None or self.__isPlaying:
             self.__stopEffect()
         self.__startTimer()
     else:
         self.__stopEffect()
     return
 def _dispose(self):
     vehicleStateCtrl = self.__getVehicleStateCtrl()
     if vehicleStateCtrl is not None:
         vehicleStateCtrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     self.__configuratorCmp = None
     ctrl = self.__getProgressionCtrl()
     if ctrl is not None:
         ctrl.removeRuntimeView(self)
     if self.app is not None:
         self.app.unregisterGuiKeyHandler(self)
     self.removeListener(GameEvent.HIDE_VEHICLE_UPGRADE, self.__handleHide,
                         EVENT_BUS_SCOPE.BATTLE)
     self.__blur.enable = False
     self.__xpLevelData = None
     BREvents.playSound(BREvents.VEH_CONFIGURATOR_HIDE)
     super(BattleVehicleConfigurator, self)._dispose()
     return
 def _populate(self):
     super(BattleVehicleConfigurator, self)._populate()
     if self.app is not None:
         self.app.registerGuiKeyHandler(self)
     self.addListener(GameEvent.HIDE_VEHICLE_UPGRADE, self.__handleHide,
                      EVENT_BUS_SCOPE.BATTLE)
     self.__blur.enable = True
     vehicle = self.__getProgressionVehicle()
     self.as_setDataS({
         'nationIcon':
         getVehicleNationIcon(vehicle),
         'vehName':
         vehicle.userName,
         'weakPointsText':
         backport.text(R.strings.battle_royale.battleVehModuleConfigurator.
                       weakZones()),
         'alertIcon':
         backport.image(R.images.gui.maps.icons.library.info())
     })
     vehicleStateCtrl = self.__getVehicleStateCtrl()
     if vehicleStateCtrl is not None:
         vehicleStateCtrl.onVehicleStateUpdated += self.__onVehicleStateUpdated
     BREvents.playSound(BREvents.VEH_CONFIGURATOR_SHOW)
     return
示例#6
0
 def _deactivateSoundEvent(self):
     if self.__soundPlaying:
         eventName = _ZONE_DEACTIVATE_EVENT_[self.__influenceZoneType]
         _logger.debug('Affect: on deactivate play sound %s', eventName)
         BREvents.playSound(eventName)
         self.__soundPlaying = False