def beforeDelete(self): LOG_DEBUG('[Battle] beforeDelete') removeListener = g_eventBus.removeListener removeListener(events.GameEvent.HELP, self.toggleHelpWindow, scope=_SCOPE) removeListener(events.GameEvent.TOGGLE_GUI, self.showAll, scope=_SCOPE) ctrl = g_sessionProvider.shared.vehicleState if ctrl is not None: ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched player = BigWorld.player() if player and player.inputHandler: player.inputHandler.onPostmortemVehicleChanged -= self.onPostmortemVehicleChanged player.inputHandler.onCameraChanged -= self.onCameraChanged if self.colorManager: self.colorManager.dispossessUI() voice = g_messengerEvents.voip if voice: voice.onPlayerSpeaking -= self.setPlayerSpeaking voice.onVoiceChatInitFailed -= self.onVoiceChatInitFailed if self.__plugins is not None: self.__plugins.stop() self.__plugins.fini() self.__plugins = None if self.movingText is not None: self.movingText.dispossessUI() self.movingText = None if self.__timerSound is not None: self.__timerSound.stop() self.__timerSound = None if self.__soundManager is not None: self.__soundManager.dispossessUI() self.__soundManager = None if self.colorManager is not None: self.colorManager.dispossessUI() self.colorManager = None if self.component: g_repeatKeyHandlers.discard(self.component.handleKeyEvent) g_settingsCore.onSettingsChanged -= self.__accs_onSettingsChanged g_settingsCore.interfaceScale.onScaleChanged -= self.__onRecreateDevice self.__timersBar.destroy() self.__battleEndWarningPanel.destroy() self.__teamBasesPanel.destroy() self.__consumablesPanel.destroy() self.__damagePanel.destroy() self.__markersManager.destroy() self.__ingameHelp.destroy() self.__vErrorsPanel.destroy() self.__vMsgsPanel.destroy() self.__pMsgsPanel.destroy() self.__radialMenu.destroy() self.__minimap.destroy() self.__ribbonsPanel.destroy() self.__fragCorrelation.destroy() self.__statsForm.destroy() self.__damageInfoPanel.destroy() remove = g_sessionProvider.removeViewComponent remove('legacy/hitDirection') remove('legacy/teamBasesPanel') remove('legacy/debugPanel') remove('legacy/battleTimer') remove('legacy/prebattleTimer') remove('legacy/ppSwitcher') if self.__arenaCtrl is not None: g_sessionProvider.removeArenaCtrl(self.__arenaCtrl) self.__arenaCtrl = None self.__ppSwitcher.destroy() self.__debugPanel.dispossessUI() self.__leftPlayersPanel.dispossessUI() self.__rightPlayersPanel.dispossessUI() MessengerEntry.g_instance.gui.invoke('dispossessUI') self.__arena = None self.__denunciator = None g_guiResetters.discard(self.__onRecreateDevice) self.__settingsInterface.dispossessUI() self.__settingsInterface = None if self.__dynSquadListener: self.__dynSquadListener.destroy() self.__dynSquadListener = None if self.__crosshairPanel is not None: self.__crosshairPanel.close() self.__crosshairPanel = None BattleWindow.beforeDelete(self) event = events.AppLifeCycleEvent g_eventBus.handleEvent(event(self.__ns, event.DESTROYED)) return
def beforeDelete(self): LOG_DEBUG('[Battle] beforeDelete') removeListener = g_eventBus.removeListener removeListener(events.GameEvent.HELP, self.toggleHelpWindow, scope=_SCOPE) removeListener(events.GameEvent.GUI_VISIBILITY, self.showAll, scope=_SCOPE) ctrl = g_sessionProvider.getVehicleStateCtrl() ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched player = BigWorld.player() if player and player.inputHandler: player.inputHandler.onPostmortemVehicleChanged -= self.onPostmortemVehicleChanged player.inputHandler.onCameraChanged -= self.onCameraChanged if self.colorManager: self.colorManager.dispossessUI() voice = VoiceChatInterface.g_instance if voice: voice.dispossessUI(self.proxy) voice.onPlayerSpeaking -= self.setPlayerSpeaking voice.onVoiceChatInitFailed -= self.onVoiceChatInitFailed if self.__plugins is not None: self.__plugins.stop() self.__plugins.fini() self.__plugins = None if self.movingText is not None: self.movingText.dispossessUI() self.movingText = None if self.__timerSound is not None: self.__timerSound.stop() self.__timerSound = None if self.__soundManager is not None: self.__soundManager.dispossessUI() self.__soundManager = None if self.colorManager is not None: self.colorManager.dispossessUI() self.colorManager = None if self.component: g_repeatKeyHandlers.discard(self.component.handleKeyEvent) g_settingsCore.onSettingsChanged -= self.__accs_onSettingsChanged g_settingsCore.interfaceScale.onScaleChanged -= self.__onRecreateDevice self.__timersBar.destroy() self.__teamBasesPanel.destroy() self.__debugPanel.destroy() self.__consumablesPanel.destroy() self.__damagePanel.destroy() self.__markersManager.destroy() self.__ingameHelp.destroy() self.__vErrorsPanel.destroy() self.__vMsgsPanel.destroy() self.__pMsgsPanel.destroy() self.__radialMenu.destroy() self.__minimap.destroy() self.__ribbonsPanel.destroy() self.__fragCorrelation.destroy() self.__statsForm.destroy() g_sessionProvider.clearBattleUI() if self.__arenaCtrl is not None: g_sessionProvider.removeArenaCtrl(self.__arenaCtrl) self.__arenaCtrl.clear() self.__arenaCtrl = None self.__ppSwitcher.destroy() self.__leftPlayersPanel.dispossessUI() self.__rightPlayersPanel.dispossessUI() MessengerEntry.g_instance.gui.invoke('dispossessUI') self.__arena = None g_guiResetters.discard(self.__onRecreateDevice) self.__settingsInterface.dispossessUI() self.__settingsInterface = None VoiceChatInterface.g_instance.onVoiceChatInitFailed -= self.onVoiceChatInitFailed if self.__dynSquadListener: self.__dynSquadListener.destroy() self.__dynSquadListener = None BattleWindow.beforeDelete(self) event = events.AppLifeCycleEvent g_eventBus.handleEvent(event(self.__ns, event.DESTROYED)) return
def beforeDelete(self): LOG_DEBUG('[Battle] beforeDelete') removeListener = g_eventBus.removeListener removeListener(events.GameEvent.HELP, self.toggleHelpWindow, scope=_SCOPE) removeListener(events.GameEvent.GUI_VISIBILITY, self.showAll, scope=_SCOPE) ctrl = g_sessionProvider.getVehicleStateCtrl() ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched if self.colorManager: self.colorManager.dispossessUI() voice = VoiceChatInterface.g_instance if voice: voice.dispossessUI(self.proxy) voice.onPlayerSpeaking -= self.setPlayerSpeaking voice.onVoiceChatInitFailed -= self.onVoiceChatInitFailed if self.__plugins is not None: self.__plugins.stop() self.__plugins.fini() self.__plugins = None if self.movingText is not None: self.movingText.dispossessUI() self.movingText = None if self.__soundManager is not None: self.__soundManager.dispossessUI() self.__soundManager = None if self.colorManager is not None: self.colorManager.dispossessUI() self.colorManager = None if self.component: g_repeatKeyHandlers.discard(self.component.handleKeyEvent) g_settingsCore.onSettingsChanged -= self.__accs_onSettingsChanged g_settingsCore.interfaceScale.onScaleChanged -= self.__onRecreateDevice self.__timersBar.destroy() self.__teamBasesPanel.destroy() self.__debugPanel.destroy() self.__consumablesPanel.destroy() self.__damagePanel.destroy() self.__markersManager.destroy() self.__ingameHelp.destroy() self.__vErrorsPanel.destroy() self.__vMsgsPanel.destroy() self.__pMsgsPanel.destroy() self.__radialMenu.destroy() self.__minimap.destroy() self.__ribbonsPanel.destroy() self.__fragCorrelation.destroy() self.__statsForm.destroy() g_sessionProvider.clearBattleUI() if self.__arenaCtrl is not None: g_sessionProvider.removeArenaCtrl(self.__arenaCtrl) self.__arenaCtrl.clear() self.__arenaCtrl = None self.__ppSwitcher.destroy() self.__leftPlayersPanel.dispossessUI() self.__rightPlayersPanel.dispossessUI() MessengerEntry.g_instance.gui.invoke('dispossessUI') self.__arena = None g_guiResetters.discard(self.__onRecreateDevice) self.__settingsInterface.dispossessUI() self.__settingsInterface = None VoiceChatInterface.g_instance.onVoiceChatInitFailed -= self.onVoiceChatInitFailed if self.__dynSquadListener: self.__dynSquadListener.destroy() self.__dynSquadListener = None BattleWindow.beforeDelete(self) event = events.AppLifeCycleEvent g_eventBus.handleEvent(event(self.__ns, event.DESTROYED))