def _populate(self):
     self.__ctx = self.service.getCtx()
     self.__blur = CachedBlur()
     g_clientUpdateManager.addMoneyCallback(self.updateButton)
     g_currentVehicle.onChangeStarted += self.__onVehicleChangeStarted
     self.__ctx.events.onUpdateStyleInfoDOF += self.__onUpdateStyleInfoDOF
     self.service.onCustomizationHelperRecreated += self.__onCustomizationHelperRecreated
 def __init__(self, _=None):
     super(BattleQueue, self).__init__()
     self.__createTime = 0
     self.__timerCallback = None
     self.__provider = None
     self._blur = CachedBlur()
     return
Example #3
0
 def _populate(self):
     super(ColorSettingsView, self)._populate()
     if self.app is not None:
         self._savedBackgroundAlpha = self.app.getBackgroundAlpha()
         self.app.setBackgroundAlpha(0)
         self.addListener(GameEvent.ON_BACKGROUND_ALPHA_CHANGE, self.__onExternalBackgroundAlphaChange, EVENT_BUS_SCOPE.GLOBAL)
     self.as_initDataS({'header': text_styles.superPromoTitle(SETTINGS.COLORSETTINGS_VIEW_HEADER),
      'typesHeader': text_styles.highTitle(SETTINGS.COLORSETTINGS_VIEW_SUBTITLE),
      'typesDesc': text_styles.main(SETTINGS.COLORSETTINGS_VIEW_DESCRIPTION),
      'applyLabel': i18n.makeString(SETTINGS.APPLY_BUTTON),
      'cancelLabel': i18n.makeString(SETTINGS.CANCEL_BUTTON),
      'settingsTypes': self.__getTypes(),
      'closeLabel': i18n.makeString(SETTINGS.COLORSETTINGS_VIEW_CLOSEBTN),
      'beforeStr': text_styles.promoSubTitle(SETTINGS.COLORSETTINGS_VIEW_BEFORE),
      'afterStr': text_styles.promoSubTitle(SETTINGS.COLORSETTINGS_VIEW_AFTER),
      'filtersHeader': text_styles.highTitle(SETTINGS.COLORSETTINGS_TAB_FILTERS),
      'filterPowerLabel': i18n.makeString(SETTINGS.COLORSETTINGS_TAB_FILTERS_INTENSITY),
      'filtersTypes': self.__getFiltersTypes(),
      'manualHeader': text_styles.highTitle(SETTINGS.COLORSETTINGS_TAB_CUSTOMSETTINGS),
      'brightnessLabel': i18n.makeString(SETTINGS.COLORSETTINGS_TAB_CUSTOMSETTINGS_BRIGHTNESS),
      'contrastLabel': i18n.makeString(SETTINGS.COLORSETTINGS_TAB_CUSTOMSETTINGS_CONTRAST),
      'saturationLabel': i18n.makeString(SETTINGS.COLORSETTINGS_TAB_CUSTOMSETTINGS_SATURATION),
      'resetLabel': i18n.makeString(SETTINGS.COLORSETTINGS_VIEW_RESETBTN)})
     self.as_updateDataS(self.__selectedTabIdx, self.__initSettings)
     self.__blur = CachedBlur(enabled=False)
     return
 def __init__(self, parent=None):
     super(BattlePassDailyQuestsIntroWindow,
           self).__init__(WindowFlags.WINDOW,
                          content=BattlePassDailyQuestsIntroView(),
                          parent=parent)
     self.__blur = CachedBlur(enabled=True,
                              ownLayer=WindowLayer.TOP_SUB_VIEW)
Example #5
0
 def _onLoading(self):
     self.__gui.windowsManager.onWindowStatusChanged += self.__windowStatusChanged
     self.__lobbyContext.addHeaderNavigationConfirmator(
         self.__handleHeaderNavigation)
     self.viewModel.onItemClicked += self.__itemClickHandler
     self.viewModel.onShowMapSelectionClicked += self.__showMapSelectionClickHandler
     self.viewModel.onShowWidgetsClicked += self.__showWidgetsClickHandler
     self.viewModel.onInfoClicked += self.__infoClickHandler
     self.__dataProvider.onListChanged += self.__dataProviderListChangeHandler
     self.__updateViewModel(self.viewModel)
     self.__blur = CachedBlur(enabled=True, ownLayer=WindowLayer.MARKER)
     g_eventBus.handleEvent(events.GameEvent(
         events.GameEvent.HIDE_LOBBY_SUB_CONTAINER_ITEMS),
                            scope=EVENT_BUS_SCOPE.GLOBAL)
     g_eventBus.handleEvent(events.LobbyHeaderMenuEvent(
         events.LobbyHeaderMenuEvent.TOGGLE_VISIBILITY,
         ctx={
             'state': HeaderMenuVisibilityState.NOTHING,
             'alias': self.layoutID
         }),
                            scope=EVENT_BUS_SCOPE.LOBBY)
     app = self.__appLoader.getApp()
     self.__prevAppBackgroundAlpha = app.getBackgroundAlpha()
     app.setBackgroundAlpha(_BACKGROUND_ALPHA)
     self.__prevOptimizationEnabled = app.graphicsOptimizationManager.getEnable(
     )
     if self.__prevOptimizationEnabled:
         app.graphicsOptimizationManager.switchOptimizationEnabled(False)
 def __init__(self, ctx=None):
     super(HangarVehicleInfo, self).__init__(ctx)
     self.__guiVehConfigurator = None
     self.__vehicle = self.__itemsCache.items.getItemByCD(
         g_currentVehicle.item.intCD)
     self.__introPage = None
     self.__blur = CachedBlur(enabled=True)
     return
 def _initialize(self):
     super(BootcampExitView, self)._initialize()
     window = self.getParentWindow()
     if self.__isInBattle:
         app = self.__appLoader.getApp()
         app.enterGuiControlMode(self.uniqueID, True, False)
     else:
         self.__blur = CachedBlur(enabled=True, ownLayer=window.layer - 1)
Example #8
0
 def __init__(self, *args, **kwargs):
     super(_HangarVehicleInfoIntroWindow, self).__init__(
         wndFlags=WindowFlags.WINDOW | WindowFlags.WINDOW_FULLSCREEN,
         decorator=None,
         content=_HangarVehicleInfoIntroView(
             R.views.lobby.battleRoyale.vehicle_info_intro_overlay.
             VehicleInfoIntroOverlay(), *args, **kwargs))
     self.__blur = CachedBlur(enabled=True, ownLayer=self.layer)
     return
Example #9
0
 def __init__(self, ctx=None):
     super(EventProgressionBuyConfirmView, self).__init__(ctx)
     self.__vehicle = ctx.get('vehicle')
     self.__price = ctx.get('price')
     self.__blur = CachedBlur(enabled=True,
                              ownLayer=APP_CONTAINERS_NAMES.DIALOGS,
                              layers=(APP_CONTAINERS_NAMES.VIEWS,
                                      APP_CONTAINERS_NAMES.WINDOWS,
                                      APP_CONTAINERS_NAMES.SUBVIEW,
                                      APP_CONTAINERS_NAMES.BROWSER))
Example #10
0
 def _populate(self):
     super(WebViewTransparent, self)._populate()
     self.__blur = CachedBlur(enabled=True, ownLayer=APP_CONTAINERS_NAMES.TOP_SUB_VIEW, layers=(APP_CONTAINERS_NAMES.SUBVIEW,
      APP_CONTAINERS_NAMES.WINDOWS,
      APP_CONTAINERS_NAMES.DIALOGS,
      APP_CONTAINERS_NAMES.IME,
      APP_CONTAINERS_NAMES.SERVICE_LAYOUT,
      APP_CONTAINERS_NAMES.MARKER,
      APP_CONTAINERS_NAMES.VIEWS,
      APP_CONTAINERS_NAMES.SYSTEM_MESSAGES))
 def __init__(self, _=None):
     super(BattleStrongholdsQueue, self).__init__()
     self.__timerCallback = None
     self.__startAnimationTime = None
     self.__animationDuration = self.ANIMATION_DEFAULT_DURATION
     self.__groups = []
     self.__battleQueueVO = {}
     self.__imagesFetchCoordinator = ImagesFetchCoordinator()
     self._blur = CachedBlur()
     return
 def _initialize(self, *args, **kwargs):
     super(BuyVehicleView, self)._initialize()
     self._blur = CachedBlur(enabled=True)
     self.__addListeners()
     isElite = self.__vehicle.isElite
     vehType = self.__vehicle.type.replace('-', '_')
     isRestore = self.__vehicle.isRestoreAvailable()
     if self.__showOnlyCongrats:
         self.viewModel.setIsContentHidden(True)
     with self.viewModel.transaction() as vm:
         vm.setIsRestore(isRestore)
         vm.setBgSource(
             R.images.gui.maps.icons.store.shop_2_background_arsenal())
         vm.setTankType('{}_elite'.format(vehType) if isElite else vehType)
         vehicleTooltip = i18n.makeString(
             getTypeUserName(self.__vehicle.type, isElite))
         noCrewLabelPath = R.strings.store.buyVehicleWindow.checkBox
         vm.setVehicleNameTooltip(vehicleTooltip)
         vm.setNation(nations.NAMES[self.__vehicle.nationID])
         vm.setNoCrewCheckboxLabel(noCrewLabelPath.restore.withoutCrew(
         ) if isRestore else noCrewLabelPath.buy.withoutCrew())
         vm.setTankLvl(int2roman(self.__vehicle.level))
         vm.setTankName(self.__vehicle.shortUserName)
         vm.setCountCrew(len(self.__vehicle.crew))
         vm.setBuyVehicleIntCD(self.__vehicle.intCD)
         vm.setIsElite(isElite)
         if self.__vehicle.hasCrew:
             vm.setWithoutCommanderAltText(
                 R.strings.store.buyVehicleWindow.crewInVehicle())
         equipmentBlock = vm.equipmentBlock
         equipmentBlock.setIsRentVisible(self.__isRentVisible)
         equipmentBlock.setTradeInIsEnabled(self.__isTradeIn())
         emtySlotAvailable = self.__itemsCache.items.inventory.getFreeSlots(
             self.__stats.vehicleSlots) > 0
         equipmentBlock.setEmtySlotAvailable(emtySlotAvailable)
         equipmentBlock.setIsRestore(isRestore)
         if self.__vehicle.hasRentPackages and (
                 not isRestore
                 or self.__actionType == VehicleBuyActionTypes.RENT
         ) and self.__actionType != VehicleBuyActionTypes.BUY:
             self.__selectedRentIdx = 0
             self.__selectedRentID = self.__vehicle.rentPackages[
                 self.__selectedRentIdx]['rentID']
         self.__updateCommanderCards()
         self.__updateSlotPrice()
         self.__updateAmmoPrice()
         self.__updateTradeInInfo()
         self.__updateRentInfo()
         self.__updateBuyBtnLabel()
         totalPriceArray = equipmentBlock.totalPrice.getItems()
         self.__addVMsInActionPriceList(
             totalPriceArray,
             ItemPrice(price=Money(credits=0, gold=0),
                       defPrice=Money(credits=0, gold=0)))
         self.__updateTotalPrice()
 def _populate(self):
     super(BCMessageWindow, self)._populate()
     self.as_setMessageDataS(self._content['messages'])
     self.__blur = CachedBlur(enabled=True,
                              ownLayer=APP_CONTAINERS_NAMES.VIEWS,
                              layers=(APP_CONTAINERS_NAMES.TOP_SUB_VIEW,
                                      APP_CONTAINERS_NAMES.SUBVIEW,
                                      APP_CONTAINERS_NAMES.WINDOWS),
                              blurAnimRepeatCount=1)
     self.as_blurOtherWindowsS(APP_CONTAINERS_NAMES.DIALOGS)
     g_bootcampEvents.onRequestBootcampMessageWindowClose += self.onMessageRemoved
     if self._hangarSpace.spaceInited:
         self.__setCameraDisabled(True)
     else:
         self._hangarSpace.onSpaceCreate += self.__onSpaceCreated
Example #14
0
 def __init__(self, layoutID, ctx=None, *args, **kwargs):
     super(_HangarVehicleInfoIntroView,
           self).__init__(layoutID, ViewFlags.OVERLAY_VIEW,
                          VehicleInfoIntroOverlayModel, *args, **kwargs)
     self.__vehicle = ctx.get('vehicle')
     self.__firstView = ctx.get('firstView', False)
     self.__blur = CachedBlur(enabled=True,
                              ownLayer=APP_CONTAINERS_NAMES.OVERLAY,
                              layers=[
                                  APP_CONTAINERS_NAMES.VIEWS,
                                  APP_CONTAINERS_NAMES.SUBVIEW,
                                  APP_CONTAINERS_NAMES.TOP_SUB_VIEW,
                                  APP_CONTAINERS_NAMES.WINDOWS,
                                  APP_CONTAINERS_NAMES.BROWSER,
                                  APP_CONTAINERS_NAMES.DIALOGS
                              ])
Example #15
0
 def __init__(self, layoutID, c11nView, *args, **kwargs):
     settings = ViewSettings(layoutID)
     settings.args = args
     settings.kwargs = kwargs
     settings.flags = ViewFlags.LOBBY_TOP_SUB_VIEW
     settings.model = ProgressiveItemsViewModel()
     super(ProgressiveItemsView, self).__init__(settings)
     self._itemsProgressData = None
     self._possibleItems = None
     self._vehicle = None
     self.__blur = CachedBlur()
     self.__layoutID = layoutID
     self.__c11nView = c11nView
     self.__urlMacros = URLMacros()
     self.__guiSettings = GUI_SETTINGS.progressiveItems.get(
         'tutorialVideo', {})
     return
Example #16
0
 def __init__(self, *args, **kwargs):
     super(MapsTrainingView, self).__init__(
         viewResource=R.views.lobby.maps_training.MapsTrainingPage(),
         viewModel=MapsTrainingViewModel())
     self.__selectedMap = None
     self.__selectedScenario = 0
     self.__ctxVehicleType = ''
     self.__ctxSide = 0
     self.__ctxShowAnimation = False
     self.__tooltipData = {}
     self.__account = BigWorld.player()
     self.__mapsConfig = TacticalMapsConfigReader.readXml(
         self._TACTICAL_MAPS_CONFIG_PATH)
     self.__isDataLoaded = False
     self.__blur = CachedBlur(blurAnimRepeatCount=1, blurRadius=0.1)
     self.__blurRectId = None
     self.__packer = getDefaultBonusPacker()
     self.__hangarCameraManager = None
     self.__tickCallback = None
     self.__preferences = self.mapsTrainingController.preferences
     self.__markerPosOffset = 0.0
     self.__finalizationInProgress = False
     self.__initFromCtx(kwargs.get('ctx', {}))
     return
 def setParentWindow(self, window):
     super(WebViewTransparent, self).setParentWindow(window)
     self.__blur = CachedBlur(enabled=True, ownLayer=window.layer)
Example #18
0
 def __init__(self, rewards, tooltips, productCode):
     super(MultipleAwardsViewWindow, self).__init__(
         content=self._getContentView(rewards, tooltips, productCode))
     self.__blur = CachedBlur(enabled=True, ownLayer=self.layer - 1)
Example #19
0
 def _initialize(self):
     super(BootcampProgressView, self)._initialize()
     window = self.getParentWindow()
     self.__blur = CachedBlur(enabled=True, ownLayer=window.layer - 1)
Example #20
0
 def _initialize(self, *args, **kwargs):
     super(_CommonCongratsView, self)._initialize()
     self.__updateVM()
     self.__addListeners()
     self._blur = CachedBlur(enabled=True)
 def load(self):
     if self.__blur is None:
         self.__blur = CachedBlur(enabled=True, ownLayer=self.layer - 1)
     super(MultipleAwardsViewWindow, self).load()
     return
 def setParentWindow(self, window):
     super(BCMessageWindow, self).setParentWindow(window)
     self.__blur = CachedBlur(enabled=True,
                              ownLayer=window.layer,
                              blurAnimRepeatCount=1)