def fini(): Waiting.close() g_eventBus.removeListener(events.GUICommonEvent.APP_STARTED, onAppStarted) LogitechMonitor.destroy() g_windowsManager.destroy() SystemMessages.g_instance.destroy() g_eventBus.clear() g_prbLoader.fini() g_clanCache.fini() game_control.g_instance.fini() g_settingsCore.fini() g_settingsCache.fini() g_eventsCache.fini() g_itemsCache.fini() g_playerEvents.onIGRTypeChanged -= onIGRTypeChanged g_playerEvents.onAccountShowGUI -= onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer -= onAccountBecomeNonPlayer g_playerEvents.onAvatarBecomePlayer -= onAvatarBecomePlayer g_playerEvents.onAccountBecomePlayer -= onAccountBecomePlayer g_playerEvents.onClientUpdated -= onClientUpdate g_playerEvents.onShopResyncStarted -= onShopResyncStarted g_playerEvents.onShopResync -= onShopResync g_playerEvents.onCenterIsLongDisconnected -= onCenterIsLongDisconnected from constants import IS_DEVELOPMENT if IS_DEVELOPMENT: try: from gui.development import fini except ImportError: LOG_ERROR('Development features not found.') fini = lambda : None fini()
def startBattle(self): LogitechMonitor.onScreenChange('battle') self.__battleWindow = Battle() self.__battleWindow.active(True) self.__battleWindow.component.visible = False self.onInitBattleGUI() return self.__battleWindow
def __onPostMortemSwitched(self): LogitechMonitor.onScreenChange('postmortem') if self.radialMenu is not None: self.radialMenu.forcedHide() if not g_sessionProvider.getCtx().isPlayerObserver(): self.__callEx('showPostmortemTips', [1.0, 5.0, 1.0]) return
def init(loadingScreenGUI = None): global onShopResyncStarted global onAccountShowGUI global onScreenShotMade global onIGRTypeChanged global onAccountBecomeNonPlayer global onAvatarBecomePlayer global onAccountBecomePlayer global onKickedFromServer global onShopResync g_loginManager.init() miniclient.configure_state() connectionManager.onKickedFromServer += onKickedFromServer g_playerEvents.onAccountShowGUI += onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer += onAccountBecomeNonPlayer g_playerEvents.onAccountBecomePlayer += onAccountBecomePlayer g_playerEvents.onAvatarBecomePlayer += onAvatarBecomePlayer g_playerEvents.onClientUpdated += onClientUpdate g_playerEvents.onShopResyncStarted += onShopResyncStarted g_playerEvents.onShopResync += onShopResync g_playerEvents.onCenterIsLongDisconnected += onCenterIsLongDisconnected g_playerEvents.onIGRTypeChanged += onIGRTypeChanged if GUI_SETTINGS.isGuiEnabled(): from gui.Scaleform.app_factory import AS3_AS2_AppFactory as AppFactory else: from gui.Scaleform.app_factory import NoAppFactory as AppFactory g_appLoader.init(AppFactory()) game_control.g_instance.init() from gui.Scaleform import SystemMessagesInterface SystemMessages.g_instance = SystemMessagesInterface.SystemMessagesInterface() SystemMessages.g_instance.init() ParametersCache.g_instance.init() if loadingScreenGUI and loadingScreenGUI.script: loadingScreenGUI.script.active(False) g_prbLoader.init() LogitechMonitor.init() g_itemsCache.init() g_settingsCache.init() g_settingsCore.init() g_eventsCache.init() g_clanCache.init() g_clubsCtrl.init() g_clanCtrl.init() g_vehicleProgressCache.init() g_goodiesCache.init() BigWorld.wg_setScreenshotNotifyCallback(onScreenShotMade) from constants import IS_DEVELOPMENT if IS_DEVELOPMENT: try: from gui.development import init except ImportError: LOG_ERROR('Development features not found.') init = lambda : None init() guiModsInit()
def createBattle(self): LOG_DEBUG('Creating app', _SPACE.SF_BATTLE) LogitechMonitor.onScreenChange('battle') battle = self.__apps[_SPACE.SF_BATTLE] if not battle: battle = self._getBattleAppInstance() self.__importer.load(battle.proxy, sf_config.COMMON_PACKAGES + sf_config.BATTLE_PACKAGES) self.__apps[_SPACE.SF_BATTLE] = battle BattleReplay.g_replayCtrl.onBattleSwfLoaded() battle.active(True) battle.component.visible = False
def createBattle(self): LOG_DEBUG('Creating app', _SPACE.SF_BATTLE) LogitechMonitor.onScreenChange('battle') battle = self.__apps[_SPACE.SF_BATTLE] if not battle: battle = self._getBattleAppInstance() self.__importer.load( battle.proxy, sf_config.COMMON_PACKAGES + sf_config.BATTLE_PACKAGES) self.__apps[_SPACE.SF_BATTLE] = battle BattleReplay.g_replayCtrl.onBattleSwfLoaded() battle.active(True) battle.component.visible = False
def init(loadingScreenGUI = None): global onIGRTypeChanged global onShopResyncStarted global onAvatarBecomePlayer global onAccountBecomePlayer global onAccountBecomeNonPlayer global onAccountShowGUI global onShopResync g_playerEvents.onAccountShowGUI += onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer += onAccountBecomeNonPlayer g_playerEvents.onAccountBecomePlayer += onAccountBecomePlayer g_playerEvents.onAvatarBecomePlayer += onAvatarBecomePlayer g_playerEvents.onClientUpdated += onClientUpdate g_playerEvents.onShopResyncStarted += onShopResyncStarted g_playerEvents.onShopResync += onShopResync g_playerEvents.onCenterIsLongDisconnected += onCenterIsLongDisconnected g_playerEvents.onIGRTypeChanged += onIGRTypeChanged game_control.g_instance.init() from gui.Scaleform import SystemMessagesInterface SystemMessages.g_instance = SystemMessagesInterface.SystemMessagesInterface() SystemMessages.g_instance.init() ParametersCache.g_instance.init() if loadingScreenGUI and loadingScreenGUI.script: loadingScreenGUI.script.active(False) g_prbLoader.init() LogitechMonitor.init() g_itemsCache.init() g_settingsCache.init() g_settingsCore.init() g_eventsCache.init() g_clanCache.init() g_clubsCtrl.init() g_vehicleProgressCache.init() g_goodiesCache.init() from constants import IS_DEVELOPMENT if IS_DEVELOPMENT: try: from gui.development import init except ImportError: LOG_ERROR('Development features not found.') init = lambda : None init()
def fini(): guiModsFini() g_soundsCtrl.fini() Waiting.close() LogitechMonitor.destroy() g_appLoader.fini() SystemMessages.g_instance.destroy() g_eventBus.clear() g_prbLoader.fini() g_clubsCtrl.fini() g_clanCtrl.fini() g_clanCache.fini() game_control.g_instance.fini() macroses.fini() g_settingsCore.fini() g_settingsCache.fini() g_eventsCache.fini() g_itemsCache.fini() g_goodiesCache.fini() g_vehicleProgressCache.fini() UsersInfoHelper.fini() connectionManager.onKickedFromServer -= onKickedFromServer g_playerEvents.onIGRTypeChanged -= onIGRTypeChanged g_playerEvents.onAccountShowGUI -= onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer -= onAccountBecomeNonPlayer g_playerEvents.onAvatarBecomePlayer -= onAvatarBecomePlayer g_playerEvents.onAccountBecomePlayer -= onAccountBecomePlayer g_playerEvents.onClientUpdated -= onClientUpdate g_playerEvents.onShopResyncStarted -= onShopResyncStarted g_playerEvents.onShopResync -= onShopResync g_playerEvents.onCenterIsLongDisconnected -= onCenterIsLongDisconnected g_loginManager.fini() BigWorld.wg_setScreenshotNotifyCallback(None) from constants import IS_DEVELOPMENT if IS_DEVELOPMENT: try: from gui.development import fini except ImportError: LOG_ERROR('Development features not found.') fini = lambda : None fini() return
def fini(): Waiting.close() game_control.g_instance.fini() g_settingsCore.fini() g_settingsCache.fini() g_questsCache.fini() g_itemsCache.fini() LogitechMonitor.destroy() g_windowsManager.destroy() SystemMessages.g_instance.destroy() g_eventBus.clear() g_prbLoader.fini() g_playerEvents.onIGRTypeChanged -= onIGRTypeChanged g_playerEvents.onAccountShowGUI -= onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer -= onAccountBecomeNonPlayer g_playerEvents.onAvatarBecomePlayer -= onAvatarBecomePlayer g_playerEvents.onAccountBecomePlayer -= onAccountBecomePlayer g_playerEvents.onClientUpdated -= onClientUpdate g_playerEvents.onShopResyncStarted -= onShopResyncStarted g_playerEvents.onShopResync -= onShopResync g_playerEvents.onCenterIsLongDisconnected -= onCenterIsLongDisconnected
def init(loadingScreenGUI = None): g_playerEvents.onAccountShowGUI += onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer += onAccountBecomeNonPlayer g_playerEvents.onAccountBecomePlayer += onAccountBecomePlayer g_playerEvents.onAvatarBecomePlayer += onAvatarBecomePlayer g_playerEvents.onClientUpdated += onClientUpdate g_playerEvents.onShopResyncStarted += onShopResyncStarted g_playerEvents.onShopResync += onShopResync g_playerEvents.onCenterIsLongDisconnected += onCenterIsLongDisconnected g_playerEvents.onIGRTypeChanged += onIGRTypeChanged game_control.g_instance.init() from gui.Scaleform import SystemMessagesInterface SystemMessages.g_instance = SystemMessagesInterface.SystemMessagesInterface() SystemMessages.g_instance.init() ParametersCache.g_instance.init() if loadingScreenGUI: loadingScreenGUI.script.active(False) g_prbLoader.init() LogitechMonitor.init() g_itemsCache.init() g_settingsCache.init() g_settingsCore.init() g_questsCache.init()
def _getLayout(cls, isFull = False): layout = [] for groupName, groupValues in cls.KEYS_LAYOUT: if not isFull: if groupName == 'minimap' and not GUI_SETTINGS.minimapSize: continue if groupName == 'voicechat' and not GUI_SETTINGS.voiceChat: continue if groupName == 'logitech_keyboard' and not LogitechMonitor.isPresentColor(): continue layout.append({'key': groupName, 'values': [ cls.__mapValues(*x) for x in groupValues ]}) return layout
def init(loadingScreenGUI=None): g_playerEvents.onAccountShowGUI += onAccountShowGUI g_playerEvents.onAccountBecomeNonPlayer += onAccountBecomeNonPlayer g_playerEvents.onAccountBecomePlayer += onAccountBecomePlayer g_playerEvents.onAvatarBecomePlayer += onAvatarBecomePlayer g_playerEvents.onClientUpdated += onClientUpdate g_playerEvents.onShopResyncStarted += onShopResyncStarted g_playerEvents.onShopResync += onShopResync g_playerEvents.onCenterIsLongDisconnected += onCenterIsLongDisconnected g_playerEvents.onIGRTypeChanged += onIGRTypeChanged game_control.g_instance.init() from gui.Scaleform import SystemMessagesInterface SystemMessages.g_instance = SystemMessagesInterface.SystemMessagesInterface( ) SystemMessages.g_instance.init() ParametersCache.g_instance.init() if loadingScreenGUI: loadingScreenGUI.script.active(False) g_prbLoader.init() LogitechMonitor.init() g_itemsCache.init() g_settingsCache.init() g_settingsCore.init() g_questsCache.init()
def _getLayout(cls, isFull=False): layout = [] for groupName, groupValues in cls.KEYS_LAYOUT: if not isFull: if groupName == 'minimap' and not GUI_SETTINGS.minimapSize: continue if groupName == 'voicechat' and not GUI_SETTINGS.voiceChat: continue if groupName == 'logitech_keyboard' and not LogitechMonitor.isPresentColor( ): continue layout.append({ 'key': groupName, 'values': [cls.__mapValues(*x) for x in groupValues] }) return layout
def __onPostMortemSwitched(self): LogitechMonitor.onScreenChange('postmortem') if self.radialMenu is not None: self.radialMenu.forcedHide() if not g_sessionProvider.getCtx().isPlayerObserver(): self.__callEx('showPostmortemTips', [1.0, 5.0, 1.0])
def showPostMortem(self): LogitechMonitor.onScreenChange('postmortem') if self.__battleWindow: self.__battleWindow.showPostmortemTips()