def __init__(self, appNS): self.__ns = appNS self.__soundManager = None self.__arena = BigWorld.player().arena self.__plugins = PluginsCollection(self) plugins = {} if hasFlags(): plugins['flagNotification'] = FlagNotificationPlugin if hasRespawns() and not BattleReplay.g_replayCtrl.isPlaying: plugins['respawnView'] = RespawnViewPlugin if hasResourcePoints(): plugins['resources'] = ResourcePointsPlugin self.__plugins.addPlugins(plugins) 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, appNS): self.__ns = appNS self.__soundManager = None self.__arena = BigWorld.player().arena self.__plugins = PluginsCollection(self) plugins = {} if hasFlags(): plugins['flagNotification'] = FlagNotificationPlugin if hasRespawns() and not BattleReplay.g_replayCtrl.isPlaying: plugins['respawnView'] = RespawnViewPlugin if hasResourcePoints(): plugins['resources'] = ResourcePointsPlugin self.__plugins.addPlugins(plugins) 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)
def _populate(self): super(SettingsWindow, self)._populate() dataVO = [{ 'label': SETTINGS.FEEDBACK_TAB_DAMAGEINDICATOR, 'linkage': VIEW_ALIAS.FEEDBACK_DAMAGE_INDICATOR }, { 'label': SETTINGS.FEEDBACK_TAB_EVENTSINFO, 'linkage': VIEW_ALIAS.FEEDBACK_BATTLE_EVENTS }, { 'label': SETTINGS.FEEDBACK_TAB_DAMAGELOGPANEL, 'linkage': VIEW_ALIAS.FEEDBACK_DAMAGE_LOG }, { 'label': SETTINGS.FEEDBACK_TAB_BATTLEBORDERMAP, 'linkage': VIEW_ALIAS.FEEDBACK_BATTLE_BORDER_MAP }] if self.lobbyContext.getServerSettings().isPMBattleProgressEnabled(): dataVO.append({ 'label': SETTINGS.FEEDBACK_TAB_QUESTSPROGRESS, 'linkage': VIEW_ALIAS.FEEDBACK_QUESTS_PROGRESS }) self.as_setFeedbackDataProviderS(dataVO) if self.__redefinedKeyModeEnabled: BigWorld.wg_setRedefineKeysMode(True) self.__currentSettings = self.params.getMonitorSettings() self._update() VibroManager.g_instance.onConnect += self.onVibroManagerConnect VibroManager.g_instance.onDisconnect += self.onVibroManagerDisconnect self.settingsCore.onSettingsChanged += self.__onColorSettingsChange self.anonymizerController.onStateChanged += self.__refreshSettings g_guiResetters.add(self.onRecreateDevice) BigWorld.wg_setAdapterOrdinalNotifyCallback(self.onRecreateDevice)
def __init__(self, appNS): self.__ns = appNS self.__isVisible = True self.__soundManager = None self.__arena = BigWorld.player().arena self.__crosshairPanel = None components = _COMPONENTS_TO_CTRLS[:] self.__plugins = PluginsCollection(self) plugins = {} visitor = g_sessionProvider.arenaVisitor if visitor.hasFlags(): components.append( (BATTLE_CTRL_ID.FLAG_NOTS, ('fallout/flagsNots', ))) plugins['flagNotification'] = FlagNotificationPlugin if visitor.hasRepairPoints(): plugins['repairTimer'] = RepairTimerPlugin if visitor.hasRespawns() and (constants.IS_DEVELOPMENT or not BattleReplay.g_replayCtrl.isPlaying): components.append((BATTLE_CTRL_ID.RESPAWN, ('fallout/respawn', ))) plugins['respawnView'] = RespawnViewPlugin if visitor.hasResourcePoints(): plugins['resources'] = ResourcePointsPlugin if visitor.hasGasAttack(): components.append( (BATTLE_CTRL_ID.GAS_ATTACK, ('fallout/gasAttack', ))) plugins['gasAttack'] = GasAttackPlugin g_sessionProvider.registerViewComponents(*components) 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 _populate(self): super(SettingsWindow, self)._populate() if self.__redefinedKeyModeEnabled: BigWorld.wg_setRedefineKeysMode(True) self.__currentSettings = self.params.getMonitorSettings() self._update() VibroManager.g_instance.onConnect += self.onVibroManagerConnect VibroManager.g_instance.onDisconnect += self.onVibroManagerDisconnect g_guiResetters.add(self.onRecreateDevice) BigWorld.wg_setAdapterOrdinalNotifyCallback(self.onRecreateDevice)
def _dispose(self): if self.__redefinedKeyModeEnabled: BigWorld.wg_setRedefineKeysMode(False) g_guiResetters.discard(self.onRecreateDevice) BigWorld.wg_setAdapterOrdinalNotifyCallback(None) self.stopVoicesPreview() self.stopAltBulbPreview() VibroManager.g_instance.onConnect -= self.onVibroManagerConnect VibroManager.g_instance.onDisconnect -= self.onVibroManagerDisconnect super(SettingsWindow, self)._dispose() return
def __init__(self, appNS): self.__ns = appNS self.__isVisible = True self.__soundManager = None self.__arena = BigWorld.player().arena self.__crosshairPanel = None components = _COMPONENTS_TO_CTRLS[:] self.__plugins = PluginsCollection(self) plugins = {} visitor = g_sessionProvider.arenaVisitor if visitor.hasFlags(): components.append((BATTLE_CTRL_ID.FLAG_NOTS, ('fallout/flagsNots',))) plugins['flagNotification'] = FlagNotificationPlugin if visitor.hasRepairPoints(): plugins['repairTimer'] = RepairTimerPlugin if visitor.hasRespawns() and (constants.IS_DEVELOPMENT or not BattleReplay.g_replayCtrl.isPlaying): components.append((BATTLE_CTRL_ID.RESPAWN, ('fallout/respawn',))) plugins['respawnView'] = RespawnViewPlugin if visitor.hasResourcePoints(): plugins['resources'] = ResourcePointsPlugin if visitor.hasGasAttack(): components.append((BATTLE_CTRL_ID.GAS_ATTACK, ('fallout/gasAttack',))) plugins['gasAttack'] = GasAttackPlugin g_sessionProvider.registerViewComponents(*components) 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 _setup(self): self.component.wg_inputKeyMode = InputKeyMode.IGNORE_RESULT self.component.position.z = DEPTH_OF_Battle self.movie.backgroundAlpha = 0.0 self.movie.setFocused(SCALEFORM_SWF_PATH_V3) BigWorld.wg_setRedefineKeysMode(False)
def onUseRedifineKeyMode(self, callbackId, isUse): if self.__enableRedefineKeysMode: BigWorld.wg_setRedefineKeysMode(isUse)
def _setup(self): self.movie.backgroundAlpha = 0.0 self.movie.setFocussed(SCALEFORM_SWF_PATH_V3) BigWorld.wg_setRedefineKeysMode(True)
def _setup(self): self.movie.setFocussed(SCALEFORM_SWF_PATH_V3) BigWorld.wg_setRedefineKeysMode(True) BigWorld.wg_setScreenshotNotifyCallback(self.__screenshotNotifyCallback)
def _setup(self): self.component.wg_inputKeyMode = 1 self.component.position.z = DEPTH_OF_Battle self.movie.backgroundAlpha = 0.0 self.movie.setFocussed(SCALEFORM_SWF_PATH_V3) BigWorld.wg_setRedefineKeysMode(False)
def useRedifineKeysMode(self, isUse): if self.__redefinedKeyModeEnabled: BigWorld.wg_setRedefineKeysMode(isUse)
def _setup(self): self.movie.setFocussed(SCALEFORM_SWF_PATH_V3) BigWorld.wg_setRedefineKeysMode(True) BigWorld.wg_setScreenshotNotifyCallback( self.__screenshotNotifyCallback)