def __init__(self): UIInterface.__init__(self) self.__colorGroup = 'default' if not ColorSchemeManager.__isXMLRead: ColorSchemeManager.__isXMLRead = True self.__readXML() self.inited = False
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.uiHolder.addExternalCallbacks({self.GET_COLORS: self.onGetColors}) from account_helpers.settings_core.SettingsCore import g_settingsCore g_settingsCore.onSettingsChanged += self.__onAccountSettingsChange self.update() self.inited = True
def dispossessUI(self): self.inited = False if self.uiHolder is not None: self.uiHolder.removeExternalCallbacks(self.GET_COLORS) self.settingsCore.onSettingsChanged -= self.__onAccountSettingsChange UIInterface.dispossessUI(self) return
def __init__(self, parentUI): UIInterface.__init__(self) self.__ui = parentUI self.__timeInterval = None self.__performanceStats = _PerformanceStats() self.__performanceStats.populateUI(parentUI) return
def dispossessUI(self): LOG_DEBUG('dispossessUI') self.__clearVoiceChatMicDeviceCallback() VOIP.api().localTestMode = False VOIP.api().clearEventCaptureDevicesUpdated() player = BigWorld.player() from Account import PlayerAccount if player is not None and player.__class__ == PlayerAccount: player.onInitPremium -= self.__onPremiumChanged Settings.g_instance.eChangedGraphicsDetails -= self.__onChangeGraphicsDetails GlobalEvents.onRefreshResolutions -= self.__handleRefreshResolutions InputMapping.g_instance.onProfileLoaded -= self.__inputProfileChanged for command in self.__externalCallbacks.iterkeys(): self.uiHolder.removeExternalCallback(command) self.__externalCallbacks = None self.__eUpdateSettings() self.__gameOptionsManager.destroy() self.__gameOptionsManager = None Settings.g_instance.cmdFilter = list() self.__virtualJoystick.dispose() self.__virtualJoystick = None self.__virtualGamePad.dispose() self.__virtualGamePad = None self.__virtualJoystickProfile.dispose() self.__virtualJoystickProfile = None Settings.g_instance.save() UIInterface.dispossessUI(self) return
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.GUICtrl = self.uiHolder.getMember('_level0.radialMenu') self.GUICtrl.script = self for state in self.ALL_SHORTCUTS: self.GUICtrl.setState(state) list = self.__getDataForFlash(state) self.GUICtrl.buildData(list)
def __init__(self, parentUI): UIInterface.__init__(self) self.proxy = proxy(self) self.GUICtrl = None self.__parentUI = parentUI self.__settings = None self.__currentTarget = None self.__currentVehicleDesc = None self.__showed = False
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) sm = self.uiHolder.movie.soundManager sm.script = self try: self.sounds.load() except Exception: LOG_ERROR('There is error while loading sounds xml data') LOG_CURRENT_EXCEPTION()
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.GUICtrl = self.uiHolder.getMember('_level0.radialMenu') self.GUICtrl.script = self for state in self.ALL_SHORTCUTS: self.GUICtrl.setState(state) list = self.__getDataForFlash(state) self.GUICtrl.buildData(list) g_eventBus.addListener(GameEvent.RADIAL_MENU_CMD, self.__handleRadialMenuCmd, scope=EVENT_BUS_SCOPE.BATTLE)
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.uiHolder.addExternalCallbacks({ '%s.RequestLength' % self.__prefix: self.onRequestLength, '%s.RequestItemAt' % self.__prefix: self.onRequestItemAt, '%s.RequestItemRange' % self.__prefix: self.onRequestItemRange })
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.GUICtrl = self.uiHolder.getMember('_level0.radialMenu') self.GUICtrl.script = self for state in self.ALL_SHORTCUTS: self.GUICtrl.setState(state) list = self.__getDataForFlash(state) self.GUICtrl.buildData(list) g_eventBus.addListener(GameEvent.RADIAL_MENU_CMD, self.__handleRadialMenuCmd, scope=EVENT_BUS_SCOPE.BATTLE) ctrl = g_sessionProvider.dynamic.respawn if ctrl is not None: ctrl.onRespawnVisibilityChanged += self.__onRespawnVisibilityChanged return
def __init__(self): UIInterface.__init__(self) self.__externalCallbacks = { 'settings.load': self.__load, 'settings.save': self.__save, 'settings.delete': self.__delete, 'settings.switchTab': self.__switchTab } Settings.g_instance.cmdFilter += [ 'CMD_GAMEPAD_TURN_RIGHT', 'CMD_GAMEPAD_TURN_LEFT', 'CMD_GAMEPAD_PITCH_DOWN', 'CMD_GAMEPAD_PITCH_UP', 'CMD_FREE_VERTICAL_CAM_GAMEPA', 'CMD_FREE_HORIZONTAL_CAM_GAMEPAD' ] self.__gameOptionsManager = GameOptionsManager( NEED_SAVE_SOURCE_SETTINGS) self.__voiceChatMicDeviceCallback = None return
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.uiHolder.movie.backgroundAlpha = 0 self.uiHolder.addExternalCallbacks(self.__externalCallbacks) GlobalEvents.onRefreshResolutions += self.__handleRefreshResolutions VOIP.api().eventCaptureDevicesUpdated += self.__onCaptureDevicesUpdated Settings.g_instance.eChangedGraphicsDetails += self.__onChangeGraphicsDetails InputMapping.g_instance.onProfileLoaded += self.__inputProfileChanged player = BigWorld.player() from Account import PlayerAccount if player is not None and player.__class__ == PlayerAccount: player.onInitPremium += self.__onPremiumChanged self.call_1('settings.initialized') class VirtualJoystickProfile: def __init__(self, sendPrimaryAxisCallBack): """ @param sendPrimaryAxisCallBack: function (axis, value) """ self.__sendPrimaryAxisCallBack = sendPrimaryAxisCallBack def sendData(self, axis, value, rawValue): if self.__sendPrimaryAxisCallBack is not None: self.__sendPrimaryAxisCallBack(axis, value, rawValue) return def dispose(self): self.__sendPrimaryAxisCallBack = None return self.__virtualJoystickProfile = VirtualJoystickProfile( self.__sendPrimaryAxis) from input.InputSubsystem.JoyInput import JoystickExpertInput self.__virtualJoystick = JoystickExpertInput( self.__virtualJoystickProfile) from input.InputSubsystem.GamepadInput import GamePadExpertInput self.__virtualGamePad = GamePadExpertInput( self.__virtualJoystickProfile) self.__virtualJoystick.setRawForceAxis(False) LOG_DEBUG('populateUI') return
def __init__(self): UIInterface.__init__(self) self.flashObject = None return
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.__setFlashDP(self.setupFlashDp(proxy)) self.__flashDP.resync() self.__flashDP.script = self
def dispossessUI(self): self.uiHolder.movie.soundManager.script = None UIInterface.dispossessUI(self)
def __init__(self, parentUI): UIInterface.__init__(self) self.__ui = parentUI self.__timeInterval = None self.__performanceStats = _PerformanceStats() self.__performanceStats.populateUI(parentUI)
def __init__(self): UIInterface.__init__(self) self.flashObject = None
def dispossessUI(self): self.uiHolder.removeExternalCallbacks( '%s.RequestLength' % self.__prefix, '%s.RequestItemAt' % self.__prefix, '%s.RequestItemRange' % self.__prefix) UIInterface.dispossessUI(self)
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.flashObject = self.uiHolder.getMember('_level0.debugPanel') self.flashObject.script = self
def dispossessUI(self): self.__flashDP.script = None self.__flashDP = None UIInterface.dispossessUI(self) return
def __init__(self): UIInterface.__init__(self) self.__flashDP = None return
def __init__(self, prefix): UIInterface.__init__(self) self.__prefix = prefix
def populateUI(self, proxy): UIInterface.populateUI(self, proxy) self.uiHolder.addExternalCallbacks({'%s.RequestLength' % self.__prefix: self.onRequestLength, '%s.RequestItemAt' % self.__prefix: self.onRequestItemAt, '%s.RequestItemRange' % self.__prefix: self.onRequestItemRange})
def dispossessUI(self): self.uiHolder.removeExternalCallbacks('%s.RequestLength' % self.__prefix, '%s.RequestItemAt' % self.__prefix, '%s.RequestItemRange' % self.__prefix) UIInterface.dispossessUI(self)