def __init__(self, appNS): g_sessionProvider.registerViewComponents(*_COMPONENTS_TO_CTRLS) self.__ns = appNS self.__soundManager = None self.__arena = BigWorld.player().arena self.__plugins = PluginsCollection(self) plugins = {} if hasFlags(): plugins['flagNotification'] = FlagNotificationPlugin if hasRepairPoints(): plugins['repairTimer'] = RepairTimerPlugin if hasRespawns() and (constants.IS_DEVELOPMENT or not BattleReplay.g_replayCtrl.isPlaying): plugins['respawnView'] = RespawnViewPlugin if hasResourcePoints(): plugins['resources'] = ResourcePointsPlugin if hasGasAttack(): plugins['gasAttack'] = GasAttackPlugin self.__plugins.addPlugins(plugins) self.__denunciator = BattleDenunciator() self.__timerSounds = {} for timer, sounds in self.VEHICLE_DEATHZONE_TIMER_SOUND.iteritems(): self.__timerSounds[timer] = {} for level, sound in sounds.iteritems(): self.__timerSounds[timer][level] = SoundGroups.g_instance.getSound2D(sound) self.__timerSound = None BattleWindow.__init__(self, 'battle.swf') self.__isHelpWindowShown = False self.__cameraMode = None self.component.wg_inputKeyMode = 1 self.component.position.z = DEPTH_OF_Battle self.movie.backgroundAlpha = 0 self.addFsCallbacks({'battle.leave': self.onExitBattle}) self.addExternalCallbacks({'battle.showCursor': self.cursorVisibility, 'battle.tryLeaveRequest': self.tryLeaveRequest, 'battle.populateFragCorrelationBar': self.populateFragCorrelationBar, 'Battle.UsersRoster.Appeal': self.onDenunciationReceived, 'Battle.selectPlayer': self.selectPlayer, 'battle.helpDialogOpenStatus': self.helpDialogOpenStatus, 'battle.initLobbyDialog': self._initLobbyDialog, 'battle.reportBug': self.reportBug}) self.__dynSquadListener = None BigWorld.wg_setRedefineKeysMode(False) self.onPostmortemVehicleChanged(BigWorld.player().playerVehicleID) return
def __init__(self, parentUI): Flash.__init__(self, _MARKERS_MANAGER_SWF) self.component.wg_inputKeyMode = 2 self.component.position.z = DEPTH_OF_VehicleMarker self.component.drawWithRestrictedViewPort = False self.movie.backgroundAlpha = 0 self.colorManager = ColorSchemeManager._ColorSchemeManager() self.colorManager.populateUI(weakref.proxy(self)) self.__plugins = PluginsCollection(self) plugins = {'equipments': _EquipmentsMarkerPlugin} if arena_info.hasFlags(): plugins['flags'] = _FlagsMarkerPlugin if arena_info.hasRepairPoints(): plugins['repairs'] = _RepairsMarkerPlugin if arena_info.hasResourcePoints(): plugins['resources'] = _ResourceMarkerPlugin self.__plugins.addPlugins(plugins) self.__ownUI = None self.__parentUI = parentUI self.__markers = {}