def __spaceDone(self): self.__spaceInited = True if self.__spaceDestroyedDuringLoad: self.__spaceDestroyedDuringLoad = False self.destroy() self.onSpaceCreate() Waiting.hide('loadHangarSpace')
def processLobby(self): yield self.__populateData() self._subscribe() if constants.IS_SHOW_SERVER_STATS: self.__requestServerStats() self.updateAccountInfo() Waiting.hide('enter')
def stopProcessing(self, result = False, data = None): if self._callback is not None: self._callback(result, data) self._callback = None if len(self._waitingID): Waiting.hide(self._waitingID) return
def __handleStartTraining(self, event): if not event.settingsID: LOG_ERROR('Name of tutorial is not defined', event.settingsID) return Waiting.show('tutorial-chapter-loading', isSingle=True) self.startTraining(event.settingsID, event.getState()) Waiting.hide('tutorial-chapter-loading')
def callback(result): if result: cd.function(*cd._packArgs(), **cd._kwargs) else: from gui.Scaleform.Waiting import Waiting Waiting.rollback()
def show(): if Disconnect.__window is None: Disconnect.__showParentCursor(False) Disconnect.__window = _Disconnect() Disconnect.__window.active(True) Waiting.close() return
def onLogin(self, user, password, host, hdlr, isSocialToken2Login = False): self.__onLoggingTryingEndHdlr = hdlr self.__kickedFromServer = False self.__kickPeripheryID = None if self.__closeCallbackId: BigWorld.cancelCallback(self.__closeCallbackId) self.__closeCallbackId = None if not isSocialToken2Login: if not self.__validateCredentials(user.lower().strip(), password.strip()): self.__onLoggingTryingEndHdlr() return Waiting.show('login') self.__loginDataLoader.host = host self.__loginDataLoader.user = user self.__loginDataLoader.passLength = len(password) self.__loginDataLoader.saveUserConfig(user, self.__loginDataLoader.host) password = pwd_token.generate(password) if len(self.__loginDataLoader.token2): password = '' token2 = self.__loginDataLoader.token2 if AUTO_LOGIN_QUERY_URL == host: g_preDefinedHosts.autoLoginQuery(lambda host: connectionManager.connect(getHostURL(host, token2), user, password, host.keyPath, nickName=None, token2=token2, isNeedSavingPwd=self.__loginDataLoader.rememberPwd)) return else: host = g_preDefinedHosts.byUrl(host) connectionManager.connect(getHostURL(host, token2, True), user, password, host.keyPath, nickName=None, token2=token2, isNeedSavingPwd=self.__loginDataLoader.rememberPwd) return
def _populate(self): super(BattleLoading, self)._populate() g_sessionProvider.addArenaCtrl(self) BigWorld.wg_updateColorGrading() BigWorld.wg_enableGUIBackground(True, False) self._addArenaTypeData() Waiting.close()
def _populate(self): super(LoginView, self)._populate() if self.__onLoadCallback is not None: self.__onLoadCallback() self.__setupDispatcherHandlers(True) self.__loginDispatcher.create() self.__enableInputsIfModalViewsNotExisting() self.__loadVersion() self.__setCopyright() Waiting.close() MusicController.g_musicController.stopAmbient() MusicController.g_musicController.play(MusicController.MUSIC_EVENT_LOGIN) self.__loadRandomBgImage() if constants.IS_DEVELOPMENT: try: tmp_fil = open('GUIUnitTest.ut', 'r') if tmp_fil.readline().strip() != '': tmp_fil.close() sys.path.append('../../gui_unit_test/scripts') import GUIUnitTest else: tmp_fil.close() except IOError: pass self.__capsLockCallback = BigWorld.callback(0.1, self.__checkUserInputState) g_sessionProvider.getCtx().lastArenaUniqueID = None self.__showRequiredLoginScreen()
def __ci_onCustomizationDropSuccess(self, message): self.as_onDropSuccessS() Waiting.hide('customizationDrop') self.__lockUpdate = False BigWorld.player().resyncDossiers() self.__refreshData() SystemMessages.pushMessage(message, type=SystemMessages.SM_TYPE.Information)
def callback(result): if result: cd.function(*cd._packArgs(), **cd._kwargs) else: from gui.Scaleform.Waiting import Waiting Waiting.rollback() self.__controller.onCaptchaInputCanceled()
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 getVehicleInfo(self): Waiting.show('updating') items = yield ItemsRequester().request() vehicle = items.getItemByCD(self.vehicleDescr.type.compactDescr) if vehicle is None: LOG_ERROR('There is error while showing vehicle info window: ', self.vehicleDescr.type.compactDescr) return else: params = vehicle.getParams() tankmenParams = list() for slotIdx, tankman in vehicle.crew: role = vehicle.descriptor.type.crewRoles[slotIdx][0] tankmanLabel = '' if tankman is not None: tankmanLabel = '%s %s (%d%%)' % (tankman.rankUserName, tankman.lastUserName, tankman.roleLevel) tankmenParams.append({'tankmanType': i18n.convert(tankmen.getSkillsConfig()[role].get('userString', '')), 'value': tankmanLabel}) info = {'vehicleName': vehicle.longUserName, 'vehicleDiscription': vehicle.fullDescription, 'vehicleImage': vehicle.icon, 'vehicleLevel': vehicle.level, 'vehicleNation': vehicle.nationID, 'vehicleElite': vehicle.isElite, 'vehicleType': vehicle.type, 'VehicleInfoPropsData': [ {'name': n, 'value': v} for n, v in params['parameters'] ], 'VehicleInfoBaseData': params['base'], 'VehicleInfoCrewData': tankmenParams} self.as_setVehicleInfoS(info) Waiting.hide('updating') return
def showKick(reason, isBan, expiryTime): if Disconnect.__window is None: Disconnect.__showParentCursor(False) Disconnect.__window = _Disconnect() Disconnect.__window.show(reason, isBan, expiryTime) Disconnect.__window.active(True) Waiting.close()
def onAvatarBecomePlayer(): yield g_settingsCache.update() g_settingsCore.serverSettings.applySettings() g_prbLoader.onAvatarBecomePlayer() game_control.g_instance.onAvatarBecomePlayer() g_clanCache.onAvatarBecomePlayer() Waiting.cancelCallback()
def cancelQueue(self, showWaiting = True, logged = False): if self.__onLoginQueue: if showWaiting: Waiting.show('enter') self.__setLoginQueue(False) self.fireEvent(LoginEvent(LoginEvent.CANCEL_LGN_QUEUE, View.alias)) self.as_cancelLoginQueueS()
def removeVehicle(self): if self.__inited: Waiting.show('loadHangarSpaceVehicle') if self.__space is not None: self.__space.removeVehicle() self.__changeDone() self.__lastUpdatedVehicle = None
def buyAndInstallItem(self, itemCD, rootCD, state): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) raise itemTypeID in GUI_ITEM_TYPE.VEHICLE_MODULES or AssertionError vehicle = g_itemsCache.items.getItemByCD(rootCD) if not vehicle.isInInventory: raise AssertionError('Vehicle must be in inventory') item = g_itemsCache.items.getItemByCD(itemCD) conflictedEqs = item.getConflictedEquipments(vehicle) if not self._canBuy(item) and self._canBuyWithExchange(item): isOk, args = yield DialogsInterface.showDialog(ExchangeCreditsMeta(itemCD, vehicle.intCD)) if not isOk: return if self._canBuy(item): Waiting.show('buyAndInstall') vehicle = g_itemsCache.items.getItemByCD(rootCD) gunCD = getGunCD(item, vehicle) result = yield BuyAndInstallItemProcessor(vehicle, item, 0, gunCD, conflictedEqs=conflictedEqs).request() processMsg(result) if result.success and item.itemTypeID in (GUI_ITEM_TYPE.TURRET, GUI_ITEM_TYPE.GUN): item = g_itemsCache.items.getItemByCD(itemCD) vehicle = g_itemsCache.items.getItemByCD(rootCD) item.isInstalled(vehicle) and (yield tryToLoadDefaultShellsLayout(vehicle)) Waiting.hide('buyAndInstall') RequestState.received(state) yield lambda callback = None: callback return
def _populate(self): battle_selector_items.create() super(LobbyHeader, self)._populate() self.app.containerManager.onViewAddedToContainer += self.__onViewAddedToContainer game_control.g_instance.wallet.onWalletStatusChanged += self.__onWalletChanged game_control.g_instance.gameSession.onPremiumNotify += self.__onPremiumTimeChanged g_currentVehicle.onChanged += self.__onVehicleChanged g_eventsCache.onSyncCompleted += self.__onEventsCacheResync self.addListener(events.FightButtonEvent.FIGHT_BUTTON_UPDATE, self.__handleFightButtonUpdated, scope=EVENT_BUS_SCOPE.LOBBY) self.addListener(events.CoolDownEvent.PREBATTLE, self.__handleSetPrebattleCoolDown, scope=EVENT_BUS_SCOPE.LOBBY) self.addListener(events.BubbleTooltipEvent.SHOW, self.__showBubbleTooltip, scope=EVENT_BUS_SCOPE.LOBBY) self.addListener(events.CloseWindowEvent.GOLD_FISH_CLOSED, self.__onGoldFishWindowClosed, scope=EVENT_BUS_SCOPE.LOBBY) g_clientUpdateManager.addCallbacks({'stats.credits': self.__setCredits, 'stats.gold': self.__setGold, 'stats.freeXP': self.__setFreeXP, 'stats.clanInfo': self.__setClanInfo, 'goodies': self.__updateGoodies, 'account.premiumExpiryTime': self.__onPremiumExpireTimeChanged, 'cache.SPA': self.__onSPAUpdated}) self.as_setFightButtonS(i18n.makeString('#menu:headerButtons/battle')) self.as_setWalletStatusS(game_control.g_instance.wallet.componentsStatuses) self.updateAccountInfo() self.startGlobalListening() self.__updateServerName() if not isTimeToShowGoldFishPromo(): enabledVal = isGoldFishActionActive() tooltip = TOOLTIPS.HEADER_REFILL_ACTION if enabledVal else TOOLTIPS.HEADER_REFILL self.as_setGoldFishEnabledS(enabledVal, False, tooltip, TOOLTIP_TYPES.COMPLEX) Waiting.hide('enter')
def beforeDelete(self): LOG_DEBUG('[App] beforeDelete') from gui.Scaleform.Waiting import Waiting Waiting.setWainingViewGetter(None) g_guiResetters.discard(self.onUpdateStage) g_repeatKeyHandlers.discard(self.component.handleKeyEvent) if self._containerMgr is not None: self._containerMgr.destroy() self._containerMgr = None if self._loaderMgr is not None: self._loaderMgr.destroy() self._loaderMgr = None if self._cacheMgr is not None: self._cacheMgr.destroy() self._cacheMgr = None if self._contextMgr is not None: self._contextMgr.destroy() self._contextMgr = None if self._popoverManager is not None: self._popoverManager.destroy() self._popoverManager = None if self._soundMgr is not None: self._soundMgr.destroy() self._soundMgr = None if self._varsMgr is not None: self._varsMgr.destroy() self._varsMgr = None if self.__toolTip is not None: self.__toolTip.destroy() self.__toolTip = None if self._colorSchemeMgr is not None: self._colorSchemeMgr.destroy() self._colorSchemeMgr = None if self._eventLogMgr is not None: self._eventLogMgr.destroy() self._eventLogMgr = None if self._guiItemsMgr is not None: self._guiItemsMgr.destroy() self._guiItemsMgr = None if self._tweenMgr is not None: self._tweenMgr.destroy() self._tweenMgr = None if self._voiceChatMgr is not None: self._voiceChatMgr.destroy() self._voiceChatMgr = None if self._gameInputMgr is not None: self._gameInputMgr.destroy() self._gameInputMgr = None if self._utilsMgr is not None: self._utilsMgr.destroy() self._utilsMgr = None if self._tutorialMgr is not None: self._tutorialMgr.destroy() self._tutorialMgr = None if self._businessHandler is not None: self._businessHandler.destroy() self._businessHandler = None self._dispose() super(App, self).beforeDelete() self.fireEvent(AppLifeCycleEvent(self.__ns, AppLifeCycleEvent.DESTROYED))
def onAccountShowGUI(ctx): g_lobbyContext.onAccountShowGUI(ctx) yield g_itemsCache.update() yield g_questsCache.update() yield g_settingsCache.update() if not g_itemsCache.isSynced(): return g_settingsCore.serverSettings.applySettings() game_control.g_instance.onAccountShowGUI(g_lobbyContext.getGuiCtx()) accDossier = g_itemsCache.items.getAccountDossier() g_rareAchievesCache.request(accDossier.getRecord('rareAchievements')) MusicController.g_musicController.setAccountAttrs(g_itemsCache.items.stats.attributes) MusicController.g_musicController.play(MusicController.MUSIC_EVENT_LOBBY) MusicController.g_musicController.play(MusicController.AMBIENT_EVENT_LOBBY) premium = isPremiumAccount(g_itemsCache.items.stats.attributes) if g_hangarSpace.inited: g_hangarSpace.refreshSpace(premium) else: g_hangarSpace.init(premium) g_currentVehicle.init() g_windowsManager.onAccountShowGUI(g_lobbyContext.getGuiCtx()) yield g_windowsManager.window.tooltipManager.request() g_prbLoader.onAccountShowGUI(g_lobbyContext.getGuiCtx()) SoundGroups.g_instance.enableLobbySounds(True) onCenterIsLongDisconnected(True) Waiting.hide('enter')
def __handleConnectionStatus(self, stage, status, serverMsg, isAutoRegister): if self.__onLoggingTryingEndHdlr: self.__onLoggingTryingEndHdlr() STATUS_LOGGED_ON = "LOGGED_ON" LOG_DEBUG("__handleConnectionStatus %s %s %s" % (stage, status, isAutoRegister)) if stage == 1: if status == STATUS_LOGGED_ON: handlerFunc = self.__logOnSuccess[status] elif isAutoRegister: handlerFunc = self.__logAutoRegisterHandlers.get(status, self.__logOnFailedDefaultHandler) if status == "DNS_LOOKUP_FAILED": self.onLoginAppFailed(status, serverMsg) else: handlerFunc = self.__logOnFailedHandlers.get(status, self.__logOnFailedDefaultHandler) if status != "LOGIN_REJECTED_LOGIN_QUEUE": self.__clearAutoLoginTimer() if status != "LOGIN_REJECTED_RATE_LIMITED": self.__resetLgTimeout() self.onCancelQueue(False, False) if status not in ("LOGIN_REJECTED_INVALID_PASSWORD",): g_preDefinedHosts.clearPeripheryTL() try: getattr(self, handlerFunc)(status, serverMsg) except: LOG_ERROR("Handle logon status error: status = %r, message = %r" % (status, serverMsg)) LOG_CURRENT_EXCEPTION() Waiting.hide("login") if connectionManager.isUpdateClientSoftwareNeeded(): self.onHandleUpdateClientSoftwareNeeded() if connectionManager.isConnected(): connectionManager.disconnect() elif status != STATUS_LOGGED_ON: connectionManager.disconnect() elif stage == 6: if not self.__kickedFromServer: self.onCancelQueue(False, False) msg = MENU.LOGIN_STATUS_DISCONNECTED if self.__kickPeripheryID is not None: if self.__kickPeripheryID == -1: msg = MENU.LOGIN_STATUS_ACCOUNTNOTREADY elif self.__kickPeripheryID == -2: msg = "#menu:login/status/centerRestart" elif self.__kickPeripheryID == -3: msg = "#menu:login/status/versionMismatch" elif connectionManager.isVersionsDiffered: msg = "" self.onHandleUpdateClientSoftwareNeeded() localizedMessage = i18n.convert(i18n.makeString(msg)) lastLoginType = Settings.g_instance.userPrefs[Settings.KEY_LOGIN_INFO].readString("lastLoginType", "basic") if lastLoginType != "basic" and not Settings.g_instance.userPrefs[Settings.KEY_LOGIN_INFO].readBool( "rememberPwd", False ): from gui.social_network_login import Bridge as socialNetworkLogin localizedMessage = socialNetworkLogin.getLogoutWarning(lastLoginType) self.onSetStatus(localizedMessage, self.ALL_VALID) connectionManager.disconnect() return
def callback(result): if result: from CurrentVehicle import g_currentVehicle BigWorld.player().enqueueEventBattles(g_currentVehicle.invID) else: from gui.Scaleform.Waiting import Waiting Waiting.rollback() self.onCaptchaInputCanceled()
def onShopResync(): yield g_itemsCache.update() if not g_itemsCache.isSynced(): return Waiting.hide('sinhronize') import time now = time.time() SystemMessages.g_instance.pushI18nMessage(SYSTEM_MESSAGES.SHOP_RESYNC, date=BigWorld.wg_getLongDateFormat(now), time=BigWorld.wg_getShortTimeFormat(now), type=SystemMessages.SM_TYPE.Information)
def updateVehicle(self, vehicle): if self.__inited: Waiting.show('loadHangarSpaceVehicle', True) igrRoomType = game_control.g_instance.igr.getRoomType() igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() updatedVehCompactDescr = getCustomizedVehCompDescr(igrLayout, vehicle.invID, igrRoomType, vehicle.descriptor.makeCompactDescr()) self.__space.recreateVehicle(self._stripVehCompDescrIfRoaming(updatedVehCompactDescr), vehicle.modelState, self.__changeDone) self.__lastUpdatedVehicle = vehicle
def handleQueue(self, queueNumber): if not self.__loginQueue: Waiting.hide("enter") self.__loginQueue = True message = i18n.makeString( WAITING.MESSAGE_QUEUE, connectionManager.serverUserName, BigWorld.wg_getIntegralFormat(queueNumber) ) self.onHandleQueue(message)
def _onKickedWhileLogin(self, peripheryID): Waiting.hide('login') messageType = 'another_periphery' if peripheryID else 'checkout_error' self.as_setErrorMessageS(_ms(SYSTEM_MESSAGES.all(messageType)), INVALID_FIELDS.ALL_VALID) if not self.__loginRetryDialogShown: self.__showLoginRetryDialog({'waitingOpen': WAITING.titles(messageType), 'waitingClose': WAITING.BUTTONS_CEASE, 'message': _ms(WAITING.message(messageType), connectionManager.serverUserName)})
def _populate(self): g_fortSoundController.init() super(FortificationsView, self)._populate() self.addListener(events.FortEvent.VIEW_LOADED, self.__onViewLoaded, scope=EVENT_BUS_SCOPE.FORT) self.addListener(events.FortEvent.REQUEST_TIMEOUT, self.__loadDisconnectedView, scope=EVENT_BUS_SCOPE.FORT) self.startFortListening() Waiting.hide('loadPage') self.loadView()
def __onDataServerReceivedData(self, token, spaID, socialNetwork): Waiting.show('login') BigWorld.callback(0.1, BigWorld.wg_bringWindowToForeground) self.__loginParams['token'] = token self.__loginParams['account_id'] = spaID from Manager import SOCIAL_NETWORKS self.__preferences['login_type'] = socialNetwork or SOCIAL_NETWORKS.WGNI connectionManager.initiateConnection(self.__loginParams, '', self.__preferences['server_name'])
def onLogin(self, userName, password, serverName, isSocialToken2Login): self._autoSearchVisited = serverName == AUTO_LOGIN_QUERY_URL result = self.__validateCredentials(userName.lower().strip(), password.strip(), bool(g_loginManager.getPreference('token2'))) if result.isValid: Waiting.show('login') g_loginManager.initiateLogin(userName, password, serverName, isSocialToken2Login, isSocialToken2Login or self._rememberUser) else: self.as_setErrorMessageS(result.errorMessage, result.invalidFields)
def beforeDelete(self): from gui.Scaleform.Waiting import Waiting Waiting.close() super(LobbyEntry, self).beforeDelete()
def _response(self, code, callback, errStr='', ctx=None): super(OptDeviceInstaller, self)._response(code, callback, errStr, ctx) from gui.Scaleform.Waiting import Waiting Waiting.hide('applyModule')
def startProcessing(self, callback=None): if len(self._waitingID): Waiting.show(self._waitingID) if callback is not None and callable(callback): self._callback = callback return
def __subViewTransferStop(self, alias): if alias != VIEW_ALIAS.BATTLE_LOADING and alias in self.VIEW_WAITING: Waiting.hide('loadPage')
def beforeDelete(self): from gui.Scaleform.Waiting import Waiting Waiting.setWainingViewGetter(None) super(LobbyEntry, self).beforeDelete() return
def _onLoaded(self, *args, **kwargs): Waiting.suspend(id(self))
def hideWaiting(self, messageID=None): if messageID is not None: Waiting.hide('tutorial-{0:>s}'.format(messageID)) else: Waiting.close() return
def load(self, url=None, title=None, showActionBtn=True, showWaiting=True, browserID=None, isAsync=False, browserSize=None, isDefault=True, callback=None, showCloseBtn=False, useBrowserWindow=True, isModal=False, showCreateWaiting=False, handlers=None, showBrowserCallback=None, isSolidBorder=False): if showCreateWaiting: Waiting.show('browser/init') url = yield self.__urlMacros.parse(url or GUI_SETTINGS.browser.url) suffix = yield self.__urlMacros.parse(GUI_SETTINGS.browser.params) concatenator = '&' if '?' in url else '?' if suffix not in url: url = concatenator.join([url, suffix]) size = browserSize or BROWSER.SIZE webBrowserID = browserID if browserID is None: browserID = self.__browserIDGenerator.next() webBrowserID = browserID elif not isinstance(browserID, int): webBrowserID = self.__browserIDGenerator.next() ctx = { 'url': url, 'title': title, 'showActionBtn': showActionBtn, 'showWaiting': showWaiting, 'browserID': browserID, 'size': size, 'isAsync': isAsync, 'showCloseBtn': showCloseBtn, 'showWindow': useBrowserWindow, 'alias': VIEW_ALIAS.BROWSER_WINDOW_MODAL if isModal else VIEW_ALIAS.BROWSER_WINDOW, 'showCreateWaiting': showCreateWaiting, 'handlers': handlers, 'showBrowserCallback': showBrowserCallback, 'isSolidBorder': isSolidBorder } if browserID not in self.__browsers and browserID not in self.__pendingBrowsers: appLoader = dependency.instance(IAppLoader) app = appLoader.getApp() if app is None: raise SoftException('Application can not be None') browser = WebBrowser(webBrowserID, app, size, url, handlers=self.__filters) self.__browsers[browserID] = browser if self.__isCreatingBrowser(): _logger.info('CTRL: Queueing a browser creation: %r - %s', browserID, url) self.__pendingBrowsers[browserID] = ctx else: self.__createBrowser(ctx) elif browserID in self.__pendingBrowsers: _logger.info( 'CTRL: Re-queuing a browser creation, overriding: %r - %s', browserID, url) self.__pendingBrowsers[browserID] = ctx elif browserID in self.__browsers: _logger.info('CTRL: Re-navigating an existing browser: %r - %s', browserID, url) browser = self.__browsers[browserID] browser.navigate(url) browser.changeTitle(title) callback(browserID) return
def __createDone(self, ctx): _logger.debug('CTRL: Finished creating a browser: %s', self.__creatingBrowserID) if ctx['showCreateWaiting']: Waiting.hide('browser/init')
def __onSpaceRefreshHandler(self): Waiting.show('loadHangarSpace')
def __onSpaceDestroyHandler(self, _): Waiting.hide('loadHangarSpace') self.__onConfirmCloseWindow(proceed=True)
def login(self, selectedServer): self.__selectedServer = selectedServer BigWorld.WGC_prepareToken() Waiting.show('login') self.__wgcCheck()
def __hideWaiting(self): if self.__currentMessage is not None: Waiting.hide(self.__currentMessage) self.__currentMessage = None return
def hideWaiting(self, messageID): if Waiting.isVisible(): Waiting.hide('tutorial-{0:>s}'.format(messageID))
def getSceneID(self): result = None if not Waiting.isVisible(): guiPage = self.uiHolder.currentInterface result = self.config.getSceneID(guiPage) return result
def stopProcessing(self, result=False, data=None): if self._callback is not None: self._callback(result, data) self._callback = None if len(self._waitingID): Waiting.hide(self._waitingID)
def showWaiting(self, messageID, isSingle=False): Waiting.show('tutorial-{0:>s}'.format(messageID), isSingle=isSingle)
def afterCreate(self): super(LobbyEntry, self).afterCreate() from gui.Scaleform.Waiting import Waiting Waiting.setWainingViewGetter(self.__getWaitingFromContainer)
def _dispose(self): if Waiting.isOpened('Flash'): Waiting.hide('Flash') self.stopPrbListening() super(TrainingsListBase, self)._dispose()
def _clearLoginView(self, *args): Waiting.hide('login') if self.__loginQueueDialogShown: self.__closeLoginQueueDialog() if self.__loginRetryDialogShown: self.__closeLoginRetryDialog()
def requestTableData(self, nation, type, filter): Waiting.show('updateShop') AccountSettings.setFilter('shop_current', (nation, type)) AccountSettings.setFilter('shop_' + type, filter) self._setTableData(filter, nation, type) Waiting.hide('updateShop')
def __nextWaiting(self): if self.__messages2Show: self.__hideWaiting() self.__currentMessage = self.__messages2Show.pop(0) Waiting.show(self.__currentMessage)
def __subViewTransferStart(self, alias): if alias in self.VIEW_WAITING: Waiting.show('loadPage')
def fini(self, ctx): if Waiting.isOpened('login'): Waiting.hide('login') ctx.resetDsn() self._dsnDesc = None return
def _populate(self): super(TrainingsListBase, self)._populate() Waiting.show('Flash') self.startPrbListening() self.__setViewData() self.sendData([], 0)
def _successHandler(self, code, ctx=None): res = super(BattlePassActivateChapterProcessor, self)._successHandler(code, ctx) Waiting.hide(self.__WAITING_TEXT) self.__pushSuccessMessage() return res
def _response(self, code, callback, ctx=None, errStr=''): super(BuyAndInstallItemProcessor, self)._response(code, callback, errStr, ctx) from gui.Scaleform.Waiting import Waiting Waiting.hide('applyModule')
def wrapper(*kargs, **kwargs): Waiting.suspend() return async (func, 'callback')(*kargs, **kwargs)
def __onSpaceCreateHandler(self): Waiting.hide('loadHangarSpace') self.refreshOutfit() self.__updateAnchorPositions()
def callback(result): Waiting.resume() cb(result)