Example #1
0
 def __init__(self):
     UIInterface.__init__(self)
     self.__colorGroup = 'default'
     if not ColorSchemeManager.__isXMLRead:
         ColorSchemeManager.__isXMLRead = True
         self.__readXML()
     self.inited = False
Example #2
0
 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
Example #3
0
 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
Example #4
0
 def __init__(self, parentUI):
     UIInterface.__init__(self)
     self.__ui = parentUI
     self.__timeInterval = None
     self.__performanceStats = _PerformanceStats()
     self.__performanceStats.populateUI(parentUI)
     return
Example #5
0
    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
Example #6
0
 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)
Example #7
0
 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
Example #8
0
 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()
Example #9
0
 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()
Example #10
0
 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
Example #11
0
    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)
Example #12
0
 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
     })
Example #13
0
    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)
Example #14
0
    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
Example #15
0
    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
Example #16
0
 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
Example #17
0
    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
Example #18
0
 def __init__(self):
     UIInterface.__init__(self)
     self.flashObject = None
     return
Example #19
0
 def populateUI(self, proxy):
     UIInterface.populateUI(self, proxy)
     self.__setFlashDP(self.setupFlashDp(proxy))
     self.__flashDP.resync()
     self.__flashDP.script = self
Example #20
0
 def dispossessUI(self):
     self.uiHolder.movie.soundManager.script = None
     UIInterface.dispossessUI(self)
Example #21
0
 def __init__(self, parentUI):
     UIInterface.__init__(self)
     self.__ui = parentUI
     self.__timeInterval = None
     self.__performanceStats = _PerformanceStats()
     self.__performanceStats.populateUI(parentUI)
Example #22
0
 def __init__(self):
     UIInterface.__init__(self)
     self.flashObject = None
Example #23
0
 def dispossessUI(self):
     self.uiHolder.movie.soundManager.script = None
     UIInterface.dispossessUI(self)
Example #24
0
 def dispossessUI(self):
     self.uiHolder.removeExternalCallbacks(
         '%s.RequestLength' % self.__prefix,
         '%s.RequestItemAt' % self.__prefix,
         '%s.RequestItemRange' % self.__prefix)
     UIInterface.dispossessUI(self)
Example #25
0
 def populateUI(self, proxy):
     UIInterface.populateUI(self, proxy)
     self.flashObject = self.uiHolder.getMember('_level0.debugPanel')
     self.flashObject.script = self
Example #26
0
 def populateUI(self, proxy):
     UIInterface.populateUI(self, proxy)
     self.__setFlashDP(self.setupFlashDp(proxy))
     self.__flashDP.resync()
     self.__flashDP.script = self
Example #27
0
 def dispossessUI(self):
     self.__flashDP.script = None
     self.__flashDP = None
     UIInterface.dispossessUI(self)
     return
Example #28
0
 def __init__(self):
     UIInterface.__init__(self)
     self.__flashDP = None
     return
Example #29
0
 def __init__(self, prefix):
     UIInterface.__init__(self)
     self.__prefix = prefix
Example #30
0
 def populateUI(self, proxy):
     UIInterface.populateUI(self, proxy)
     self.flashObject = self.uiHolder.getMember('_level0.debugPanel')
     self.flashObject.script = self
Example #31
0
 def dispossessUI(self):
     self.__flashDP.script = None
     self.__flashDP = None
     UIInterface.dispossessUI(self)
     return
Example #32
0
 def __init__(self):
     UIInterface.__init__(self)
     self.__flashDP = None
     return
Example #33
0
 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})
Example #34
0
 def dispossessUI(self):
     self.uiHolder.removeExternalCallbacks('%s.RequestLength' % self.__prefix, '%s.RequestItemAt' % self.__prefix, '%s.RequestItemRange' % self.__prefix)
     UIInterface.dispossessUI(self)
Example #35
0
 def __init__(self, prefix):
     UIInterface.__init__(self)
     self.__prefix = prefix