Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 def _dispose(self):
     vehicleStateCtrl = self.__getVehicleStateCtrl()
     if vehicleStateCtrl is not None:
         vehicleStateCtrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     if BattleReplay.g_replayCtrl.isPlaying:
         g_replayEvents.onTimeWarpStart -= self.__onReplayTimeWarpStart
     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.__isActive = False
     BREvents.playSound(BREvents.VEH_CONFIGURATOR_HIDE)
     super(BattleVehicleConfigurator, self)._dispose()
     return
Ejemplo n.º 5
0
 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
     if BattleReplay.g_replayCtrl.isPlaying:
         g_replayEvents.onTimeWarpStart += self.__onReplayTimeWarpStart
     BREvents.playSound(BREvents.VEH_CONFIGURATOR_SHOW)
     self.__isActive = True
     return
Ejemplo n.º 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