def __setTitlesData(self):
        seasonTitlesText = {season:_ms(_CUSTOMIZATION_SEASON_TITLES[season]) for season in SeasonType.COMMON_SEASONS}
        if self.__isStyle:
            item = self.__ctx.getPurchaseItems()[0].item
            titleTemplate = '{} {}'.format(item.userType, item.userName)
            bigTitleTemplate = '{}\n{}'.format(item.userType, text_styles.heroTitle(item.userName))
        else:
            totalCount = 0
            for season in SeasonType.COMMON_SEASONS:
                purchase, inventory = self.__counters[season]
                count = purchase + inventory
                totalCount += count
                seasonTitlesText[season] += (text_styles.unavailable(' ({})') if count == 0 else ' ({})').format(count)

            titleTemplate = '{} ({})'.format(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_BUYWINDOW_TITLE), totalCount)
            bigTitleTemplate = text_styles.grandTitle(titleTemplate)
        titleText = text_styles.promoTitle(bigTitleTemplate)
        titleTextSmall = text_styles.promoTitle(titleTemplate)
        self.as_setInitDataS({'windowTitle': VEHICLE_CUSTOMIZATION.WINDOW_PURCHASE_HEADER,
         'isStyle': self.__isStyle,
         'titleText': titleText,
         'titleTextSmall': titleTextSmall})
        self.as_setTitlesS({'summerTitle': seasonTitlesText[SeasonType.SUMMER],
         'winterTitle': seasonTitlesText[SeasonType.WINTER],
         'desertTitle': seasonTitlesText[SeasonType.DESERT]})
 def __getHeaderData(self):
     vehicle = g_currentPreviewVehicle.item
     return {
         'tankType':
         '{}_elite'.format(vehicle.type)
         if vehicle.isElite else vehicle.type,
         'tankInfo':
         text_styles.concatStylesToMultiLine(
             text_styles.promoSubTitle(vehicle.userName),
             text_styles.stats(MENU.levels_roman(vehicle.level))),
         'closeBtnLabel':
         VEHICLE_PREVIEW.HEADER_CLOSEBTN_LABEL,
         'backBtnLabel':
         VEHICLE_PREVIEW.HEADER_BACKBTN_LABEL,
         'backBtnDescrLabel':
         self.__getBackBtnLabel(),
         'titleText':
         text_styles.promoTitle(VEHICLE_PREVIEW.HERO_HEADER_TITLE)
         if self.__isHeroTank else text_styles.promoTitle(
             VEHICLE_PREVIEW.HEADER_TITLE),
         'isPremiumIGR':
         vehicle.isPremiumIGR,
         'showCloseBtn':
         self._showHeaderCloseBtn
     }
Ejemplo n.º 3
0
 def __makeVO(self, data):
     creditsDiff = '+ %s' % BigWorld.wg_getNiceNumberFormat(data.creditsDiff)
     xpDiff = '+ %s' % BigWorld.wg_getNiceNumberFormat(data.xpDiff)
     premStr = text_styles.neutral(BATTLE_RESULTS.GETPREMIUMPOPOVER_PREM)
     awardStr = text_styles.neutral(BATTLE_RESULTS.GETPREMIUMPOPOVER_AWARD)
     descriptionText = _ms(BATTLE_RESULTS.GETPREMIUMPOPOVER_DESCRIPTIONTEXT, prem=premStr, award=awardStr)
     result = {'arenaUniqueID': data.arenaUniqueID,
      'headerTF': {'htmlText': text_styles.highTitle(BATTLE_RESULTS.GETPREMIUMPOPOVER_HEADERTEXT)},
      'creditsTF': {'htmlText': text_styles.promoTitle(creditsDiff)},
      'creditsIcon': {'source': RES_ICONS.MAPS_ICONS_LIBRARY_CREDITSICONBIG_1},
      'xpTF': {'htmlText': text_styles.promoTitle(xpDiff)},
      'xpIcon': {'source': RES_ICONS.MAPS_ICONS_LIBRARY_XPICONBIG_1},
      'descriptionTF': {'htmlText': text_styles.main(descriptionText)},
      'actionBtn': {'label': BATTLE_RESULTS.GETPREMIUMPOPOVER_ACTIONBTN_LABEL}}
     return result
Ejemplo n.º 4
0
 def __getHeaderData(self):
     key = _BACK_BTN_LABELS.get(self.__backAlias, 'hangar')
     backBtnDescrLabel = '#veh_compare:header/backBtn/descrLabel/{}'.format(key)
     return {'closeBtnLabel': VEH_COMPARE.HEADER_CLOSEBTN_LABEL,
      'backBtnLabel': VEH_COMPARE.HEADER_BACKBTN_LABEL,
      'backBtnDescrLabel': backBtnDescrLabel,
      'titleText': text_styles.promoTitle(VEH_COMPARE.VEHICLECOMPAREVIEW_HEADER)}
 def _populate(self):
     super(CyberSportIntroView, self)._populate()
     self.addListener(CSVehicleSelectEvent.VEHICLE_SELECTED,
                      self.__updateSelectedVehicles)
     self.itemsCache.onSyncCompleted += self.__onCacheResync
     data = {
         'titleLblText':
         text_styles.promoTitle(CYBERSPORT.WINDOW_INTRO_TITLE),
         'descrLblText':
         text_styles.main(CYBERSPORT.WINDOW_INTRO_DESCRIPTION),
         'listRoomTitleLblText':
         text_styles.promoSubTitle(CYBERSPORT.WINDOW_INTRO_SEARCH_TITLE),
         'listRoomDescrLblText':
         text_styles.main(CYBERSPORT.WINDOW_INTRO_SEARCH_DESCRIPTION),
         'listRoomBtnLabel':
         _ms(CYBERSPORT.WINDOW_INTRO_SEARCH_BTN),
         'autoTitleLblText':
         text_styles.middleTitle(CYBERSPORT.WINDOW_INTRO_AUTO_TITLE),
         'autoDescrLblText':
         text_styles.main(CYBERSPORT.WINDOW_INTRO_AUTO_DESCRIPTION),
         'vehicleBtnTitleTfText':
         text_styles.standard(CYBERSPORT.BUTTON_CHOOSEVEHICLES_SELECTED),
         'rightBlockHeader':
         text_styles.promoSubTitle(CYBERSPORT.INTROVIEW_RIGHTBLOCK_HEADER),
         'rightBlockDescr':
         text_styles.main(CYBERSPORT.INTROVIEW_RIGHTBLOCK_DESCR),
         'rightBlockBtnLbl':
         _ms(CYBERSPORT.INTROVIEW_RIGHTBLOCK_BTNLABEL)
     }
     self.as_setTextsS(data)
     self.__checkSelectedVehicles()
     self.__updateAutoSearchVehicle(self.__getSelectedVehicles())
 def _populate(self):
     super(ReferralReferrerIntroWindow, self)._populate()
     blocks = [
         self.__packContentBlock(
             'invite_block',
             RES_ICONS.MAPS_ICONS_LIBRARY_REFERRALINVITEICON_1,
             ctx={
                 'inviteCount':
                 self.__invitesCount,
                 'link':
                 self.__makeHyperLink(
                     OpenLinkEvent.INVIETES_MANAGEMENT,
                     MENU.REFERRALREFERRERINTROWINDOW_TEXTBLOCK_LINK)
             },
             showLinkBtn=True),
         self.__packContentBlock(
             'squad_block', RES_ICONS.MAPS_ICONS_BATTLETYPES_40X40_SQUAD),
         self.__packContentBlock(
             'referrals_block',
             RES_ICONS.MAPS_ICONS_REFERRAL_REFERRALHAND,
             ctx={
                 'icon':
                 icons.makeImageTag(
                     RES_ICONS.MAPS_ICONS_REFERRAL_REFERRALSMALLHAND, 16,
                     16, -4, 0)
             })
     ]
     self.as_setDataS({
         'titleMsg':
         text_styles.promoTitle(
             i18n.makeString(
                 MENU.REFERRALREFERRERINTROWINDOW_TITLEMESSAGE)),
         'blocksVOs':
         blocks
     })
Ejemplo n.º 7
0
 def _populate(self):
     super(QuestsPersonalWelcomeView, self)._populate()
     falloutEnabled = g_lobbyContext.getServerSettings(
     ).isFalloutQuestEnabled()
     if falloutEnabled:
         announcementIcon = ARENA_GUI_TYPE_LABEL.LABELS[
             ARENA_GUI_TYPE.FALLOUT_CLASSIC]
         announcementText = text_styles.promoSubTitle(
             QUESTS.QUESTSPERSONALWELCOMEVIEW_ANNOUNCEMENTTEXT)
         background = RES_ICONS.MAPS_ICONS_QUESTS_PROMOSCREEN_FALLOUT
     else:
         announcementIcon = None
         announcementText = None
         background = RES_ICONS.MAPS_ICONS_QUESTS_PROMOSCREEN
     self.as_setDataS({
         'buttonLbl':
         QUESTS.QUESTSPERSONALWELCOMEVIEW_BTNLABEL,
         'titleText':
         text_styles.promoTitle(
             i18n.makeString(
                 QUESTS.QUESTSPERSONALWELCOMEVIEW_MAINTITLE_TEXTLABEL)),
         'blockData':
         self.__makeBlocksData(),
         'showAnnouncement':
         falloutEnabled,
         'announcementIcon':
         announcementIcon,
         'announcementText':
         announcementText,
         'background':
         background
     })
     return
Ejemplo n.º 8
0
    def __update(self):
        operations = []
        blinkDelay = BLINK_DELAY
        selectedOperation = -1
        areAllOperationsPassed = True
        sortedOperations = sorted(events_helpers.getPersonalMissionsCache().getOperations().iteritems(), key=operator.itemgetter(0))
        for oID, o in sortedOperations:
            title = text_styles.main(o.getShortUserName())
            state = PERSONAL_MISSIONS_ALIASES.OPERATION_UNLOCKED_STATE
            isAwardAchieved = o.isAwardAchieved()
            if o.isUnlocked() and not isAwardAchieved:
                selectedOperation = oID
            if not isAwardAchieved:
                areAllOperationsPassed = False
            if o.isFullCompleted():
                state = PERSONAL_MISSIONS_ALIASES.OPERATION_COMPLETE_FULL_STATE
            elif isAwardAchieved:
                state = PERSONAL_MISSIONS_ALIASES.OPERATION_COMPLETE_STATE
            elif o.isInProgress():
                state = PERSONAL_MISSIONS_ALIASES.OPERATION_CURRENT_STATE
            operationVO = {'title': title,
             'id': oID,
             'state': state,
             'showDelay': blinkDelay}
            blinkDelay += BLINK_DELAY_STEP
            operations.append(operationVO)

        self.as_setDataS({'operationTitle': {'title': text_styles.promoTitle(PERSONAL_MISSIONS.OPERATIONINFO_TITLE)},
         'operations': operations,
         'selectedOperation': selectedOperation,
         'areAllOperationsPassed': areAllOperationsPassed})
        self.soundManager.setRTPC(SOUNDS.RTCP_MISSIONS_ZOOM, SOUNDS.MAX_MISSIONS_ZOOM)
        self.soundManager.setRTPC(SOUNDS.RTCP_DEBRIS_CONTROL, SOUNDS.MAX_MISSIONS_ZOOM)
Ejemplo n.º 9
0
 def _populate(self):
     super(CyberSportIntroView, self)._populate()
     self.addListener(CSVehicleSelectEvent.VEHICLE_SELECTED,
                      self.__updateSelectedVehicles)
     self.as_setTextsS({
         'titleLblText':
         text_styles.promoTitle(CYBERSPORT.WINDOW_INTRO_TITLE),
         'descrLblText':
         text_styles.main(CYBERSPORT.WINDOW_INTRO_DESCRIPTION),
         'listRoomTitleLblText':
         text_styles.promoSubTitle(CYBERSPORT.WINDOW_INTRO_SEARCH_TITLE),
         'listRoomDescrLblText':
         text_styles.main(CYBERSPORT.WINDOW_INTRO_SEARCH_DESCRIPTION),
         'listRoomBtnLabel':
         _ms(CYBERSPORT.WINDOW_INTRO_SEARCH_BTN),
         'autoTitleLblText':
         text_styles.middleTitle(CYBERSPORT.WINDOW_INTRO_AUTO_TITLE),
         'autoDescrLblText':
         text_styles.main(CYBERSPORT.WINDOW_INTRO_AUTO_DESCRIPTION),
         'vehicleBtnTitleTfText':
         text_styles.standard(CYBERSPORT.BUTTON_CHOOSEVEHICLES_SELECTED),
         'regulationsInfoText':
         '{0}{1}'.format(
             icons.info(),
             text_styles.main(CYBERSPORT.LADDERREGULATIONS_INFO)),
         'regulationsInfoTooltip':
         TOOLTIPS_CONSTANTS.LADDER_REGULATIONS
     })
     self.__updateClubData()
     self.__updateAutoSearchVehicle(self.__getSelectedVehicles())
     self.startMyClubListening()
     self.clubsCtrl.getAvailabilityCtrl(
     ).onStatusChanged += self.onStatusChanged
Ejemplo n.º 10
0
 def __packWebLeagueBlock(cls, leagueData):
     if leagueData is not None:
         leagueNumber = leagueData.get('league', 0)
         if leagueNumber > 0:
             leagueNumber = int2roman(leagueNumber)
         else:
             leagueNumber = _ms(
                 RANKED_BATTLES.RANKEDBATTLEVIEW_AWARDBLOCK_EMPTYLEAGUE)
         description = text_styles.main(
             RANKED_BATTLES.RANKEDBATTLEVIEW_AWARDBLOCK_POINTS_DESCRIPTION)
         value = text_styles.promoTitle(leagueNumber)
     else:
         description = text_styles.main(
             RANKED_BATTLES.
             RANKEDBATTLEVIEW_AWARDBLOCK_POINTSALT_DESCRIPTION)
         value = ''
     return cls.__packBlockData(
         _AWARD_BLOCK_IDS.WEB_LEAGUE, {
             'image':
             RES_ICONS.
             MAPS_ICONS_RANKEDBATTLES_RANKEDBATTESVIEW_ICON_RANKS_LADDERS_208X100,
             'header':
             text_styles.highTitle(
                 RANKED_BATTLES.RANKEDBATTLEVIEW_AWARDBLOCK_POINTS_HEADER),
             'description':
             description,
             'value':
             value
         })
Ejemplo n.º 11
0
    def __getAwardsData(self, points, rewardingComplete, isAwarded):
        data = []
        awardsMap = self.__rankedController.getYearAwardsPointsMap()
        for awardName in YEAR_AWARDS_ORDER:
            minPoints, maxPoints = awardsMap[awardName]
            statusText = None
            if points > maxPoints:
                status = _RBC.YEAR_REWARD_STATUS_PASSED_FINAL if rewardingComplete else _RBC.YEAR_REWARD_STATUS_PASSED
            elif maxPoints >= points >= minPoints:
                selectableRewardsCount = self.__rankedController.getYearRewardCount()
                if selectableRewardsCount:
                    status = _RBC.YEAR_REWARD_STATUS_CURRENT_CHOOSE
                    statusText = backport.text(R.strings.ranked_battles.rewardsView.tabs.year.currentChoose())
                    self.as_setChooseRewardBtnCounterS(str(selectableRewardsCount))
                elif rewardingComplete:
                    status = _RBC.YEAR_REWARD_STATUS_CURRENT_FINAL
                    statusText = text_styles.statInfo(backport.text(R.strings.ranked_battles.rewardsView.tabs.year.currentFinal()))
                else:
                    status = _RBC.YEAR_REWARD_STATUS_CURRENT
                    statusText = text_styles.statusAlert(backport.text(R.strings.ranked_battles.rewardsView.tabs.year.current()))
            else:
                status = _RBC.YEAR_REWARD_STATUS_LOCKED_FINAL if rewardingComplete else _RBC.YEAR_REWARD_STATUS_LOCKED
            pointsVO = {}
            if not isAwarded:
                pointsVO = {'text': text_styles.promoTitle(minPoints),
                 'image': backport.image(R.images.gui.maps.icons.rankedBattles.ranked_point_28x28())}
            data.append({'id': awardName,
             'status': status,
             'statusText': statusText,
             'points': pointsVO})

        return data
Ejemplo n.º 12
0
 def __getHeaderData(self):
     return {
         'closeBtnLabel': VEHICLE_PREVIEW.HEADER_CLOSEBTN_LABEL,
         'backBtnLabel': VEHICLE_PREVIEW.HEADER_BACKBTN_LABEL,
         'backBtnDescrLabel': self.__getBackBtnLabel(),
         'titleText': text_styles.promoTitle(VEHICLE_PREVIEW.HEADER_TITLE)
     }
Ejemplo n.º 13
0
 def __getHeaderData(self):
     key = _BACK_BTN_LABELS.get(self.__backAlias, 'hangar')
     backBtnDescrLabel = '#veh_compare:header/backBtn/descrLabel/{}'.format(key)
     return {'closeBtnLabel': VEH_COMPARE.HEADER_CLOSEBTN_LABEL,
      'backBtnLabel': VEH_COMPARE.HEADER_BACKBTN_LABEL,
      'backBtnDescrLabel': backBtnDescrLabel,
      'titleText': text_styles.promoTitle(VEH_COMPARE.VEHICLECOMPAREVIEW_HEADER)}
Ejemplo n.º 14
0
 def __getQuestImproveTitleData(quest):
     return {
         'nextQuestText':
         text_styles.promoTitle(quest.getUserName()),
         'nextQuestTitle':
         text_styles.highlightText(
             _PM.QUESTAWARDSCREEN_NEXTQUEST_TITLE_QUESTIMPROVE)
     }
 def _populate(self):
     super(ReferralReferralsIntroWindow, self)._populate()
     contentKey = 'referrals' if self.__isNewbie else 'phenix'
     referrerNameFmt = text_styles.warning(self.__referrerName)
     handIcon = icons.makeImageTag(RES_ICONS.MAPS_ICONS_REFERRAL_REFERRALSMALLHAND, 16, 16, -4, 0)
     self.as_setDataS({'titleTF': text_styles.promoTitle(i18n.makeString(MENU.REFERRALREFERRALSINTROWINDOW_TEXT_BLOCK_TITLE, userName=getattr(BigWorld.player(), 'name', 'Unknown'))),
      'bodyTF': text_styles.main(i18n.makeString(MENU.referralreferralsintrowindow_text_block_body(contentKey), referrerName=referrerNameFmt, handIcon=handIcon)),
      'squadTF': text_styles.main(i18n.makeString(MENU.REFERRALREFERRALSINTROWINDOW_TEXT_BLOCK_SQUAD_TEXT))})
 def __packNextQuestTitleSection(self, isFinal):
     dataVO = {}
     if self._addReward:
         if self._nextQuest:
             nextQuestTitle = _PM.QUESTAWARDSCREEN_NEXTQUEST_TITLE_QUESTACCEPT
             nextQuestText = self._nextQuest.getUserName()
             dataVO.update({
                 'nextQuestText':
                 text_styles.promoTitle(nextQuestText),
                 'nextQuestTitle':
                 text_styles.highlightText(nextQuestTitle)
             })
         else:
             chainName = getTypeShortUserName(
                 self._quest.getQuestClassifier().classificationAttr)
             nextQuestTitle = _ms(_PM.STATUSPANEL_STATUS_ALLDONE,
                                  vehicleClass=chainName)
             dataVO.update({
                 'nextQuestTitle':
                 text_styles.highlightText(nextQuestTitle)
             })
     elif self._isAwardListUsed:
         if isFinal:
             dataVO.update({
                 'nextQuestTitle':
                 text_styles.highlightText(
                     QUESTS.PERSONALMISSION_STATUS_LASTDONEWITHPAWN)
             })
         elif self._quest.isInProgress():
             dataVO.update({
                 'nextQuestText':
                 text_styles.promoTitle(self._quest.getUserName()),
                 'nextQuestTitle':
                 text_styles.highlightText(
                     _PM.QUESTAWARDSCREEN_NEXTQUEST_TITLE_QUESTIMPROVE)
             })
     else:
         dataVO.update({
             'nextQuestText':
             text_styles.promoTitle(self._quest.getUserName()),
             'nextQuestTitle':
             text_styles.highlightText(
                 _PM.QUESTAWARDSCREEN_NEXTQUEST_TITLE_QUESTIMPROVE)
         })
     return dataVO
Ejemplo n.º 17
0
 def __setHeaderInitData(self):
     isElite = g_currentVehicle.item.isElite
     vTypeId = g_currentVehicle.item.type
     vTypeId = '{0}_elite'.format(vTypeId) if isElite else vTypeId
     self.as_setHeaderDataS({'titleText': text_styles.promoTitle(VEHICLE_CUSTOMIZATION.CUSTOMIZATIONHEADER_TITLE),
      'tankName': text_styles.promoSubTitle(g_currentVehicle.item.userName),
      'tankType': vTypeId,
      'isElite': isElite,
      'closeBtnTooltip': makeTooltip(TOOLTIPS.CUSTOMIZATION_HEADERCLOSEBTN_HEADER, TOOLTIPS.CUSTOMIZATION_HEADERCLOSEBTN_BODY)})
Ejemplo n.º 18
0
 def __setHeaderInitData(self):
     isElite = g_currentVehicle.item.isElite
     vTypeId = g_currentVehicle.item.type
     vTypeId = '{0}_elite'.format(vTypeId) if isElite else vTypeId
     self.as_setHeaderDataS({'titleText': text_styles.promoTitle(VEHICLE_CUSTOMIZATION.CUSTOMIZATIONHEADER_TITLE),
      'tankName': text_styles.promoSubTitle(g_currentVehicle.item.userName),
      'tankType': vTypeId,
      'isElite': isElite,
      'closeBtnTooltip': makeTooltip(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_HEADERCLOSEBTN_HEADER, VEHICLE_CUSTOMIZATION.CUSTOMIZATION_HEADERCLOSEBTN_BODY)})
Ejemplo n.º 19
0
 def _populate(self):
     super(QuestsPersonalWelcomeView, self)._populate()
     self.as_setDataS({'buttonLbl': QUESTS.QUESTSPERSONALWELCOMEVIEW_BTNLABEL,
      'titleText': text_styles.promoTitle(i18n.makeString(QUESTS.QUESTSPERSONALWELCOMEVIEW_MAINTITLE_TEXTLABEL)),
      'blockData': self.__makeBlocksData(),
      'showAnnouncement': True,
      'announcementIcon': ARENA_GUI_TYPE_LABEL.LABELS[ARENA_GUI_TYPE.EVENT_BATTLES],
      'announcementText': text_styles.promoSubTitle(QUESTS.QUESTSPERSONALWELCOMEVIEW_ANNOUNCEMENTTEXT),
      'background': RES_ICONS.MAPS_ICONS_QUESTS_PROMOSCREEN})
Ejemplo n.º 20
0
 def __getHeaderData(self):
     vehicle = g_currentPreviewVehicle.item
     return {'tankType': '{}_elite'.format(vehicle.type) if vehicle.isElite else vehicle.type,
      'tankInfo': text_styles.concatStylesToMultiLine(text_styles.promoSubTitle(vehicle.shortUserName), text_styles.stats(MENU.levels_roman(vehicle.level))),
      'closeBtnLabel': VEHICLE_PREVIEW.HEADER_CLOSEBTN_LABEL,
      'backBtnLabel': VEHICLE_PREVIEW.HEADER_BACKBTN_LABEL,
      'backBtnDescrLabel': self.__getBackBtnLabel(),
      'titleText': text_styles.promoTitle(VEHICLE_PREVIEW.HEADER_TITLE),
      'isPremiumIGR': vehicle.isPremiumIGR}
Ejemplo n.º 21
0
 def __makeData(self):
     result = {}
     self.__updateNextBattleCount()
     result['actionDescr'] = text_styles.standard(i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_ACTIONDESCR))
     result['titleLbl'] = text_styles.promoTitle(i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_TITLELBL))
     result['descrLbl'] = text_styles.main(i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_DESCRLBL))
     localeBattleCount = i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_CURRENTBTLCOUNT)
     result['battlesCountTitle'] = text_styles.highTitle(localeBattleCount)
     result['tableHeader'] = self._createTableHeader()
     self.as_setClanBattleDataS(result)
Ejemplo n.º 22
0
 def _populate(self):
     super(CyberSportUnitsListView, self)._populate()
     self._cooldown.start()
     self.prbEntity.getBrowser().start(self.__onUnitsListUpdated)
     self.as_setHeaderS({'title': text_styles.promoTitle(CYBERSPORT.WINDOW_UNITLISTVIEW_TITLE),
      'createBtnLabel': CYBERSPORT.WINDOW_UNITLISTVIEW_CREATE_BTN,
      'createBtnTooltip': None,
      'createBtnEnabled': True,
      'columnHeaders': self.__getColumnHeaders()})
     return
Ejemplo n.º 23
0
 def __makeData(self):
     result = {}
     self.__updateNextBattleCount()
     result['actionDescr'] = text_styles.standard(i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_ACTIONDESCR))
     result['titleLbl'] = text_styles.promoTitle(i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_TITLELBL))
     result['descrLbl'] = text_styles.main(i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_DESCRLBL))
     localeBattleCount = i18n.makeString(FORTIFICATIONS.FORTCLANBATTLELIST_CURRENTBTLCOUNT)
     result['battlesCountTitle'] = text_styles.highTitle(localeBattleCount)
     result['tableHeader'] = self._createTableHeader()
     self.as_setClanBattleDataS(result)
Ejemplo n.º 24
0
def getBaseTitleVO(vehicle):
    tankUserName = vehicle.userName
    return {
        'intCD': vehicle.intCD,
        'tankNameStr': text_styles.grandTitle(tankUserName),
        'tankNameStrSmall': text_styles.promoTitle(tankUserName),
        'statusStr': '',
        'roleText': getRoleTextWithIcon(vehicle.role, vehicle.roleLabel),
        'showInfoIcon': False
    }
 def __updateNotActivatedView(self):
     _ms = i18n.makeString
     titleText = text_styles.promoTitle(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_TITLE))
     description = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_DESCRIPTION))
     conditionTitle = text_styles.middleTitle(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONTITLE))
     firstConditionIcon = icons.checkmark()
     secondConditionIcon = icons.checkmark()
     conditionsText = text_styles.middleTitle(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS))
     fortConditionsText = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS_FORTLEVEL))
     defenceConditionsText = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS_DEFENCE))
     attackConditionsText = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS_ATTACK))
     firstConditionNotReady = ""
     secondConditionNotReady = ""
     if not self.__checkBaseLevel():
         firstConditionIcon = text_styles.standard("-")
         firstConditionNotReady = text_styles.error(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_ISNOTREADY))
     if not self.__checkPlayerCount():
         secondConditionIcon = text_styles.standard("-")
         secondConditionNotReady = text_styles.error(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_ISNOTREADY))
     firstConditionMsg = text_styles.main(
         _ms(
             FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_BASELEVELCONDITION,
             level=fort_formatters.getTextLevel(g_fortCache.defenceConditions.minRegionLevel),
             isNotReady=firstConditionNotReady,
         )
     )
     secondConditionMsg = text_styles.main(
         _ms(
             FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_PLAYERCOUNTCONDITION,
             membersCount=BigWorld.wg_getNiceNumberFormat(g_fortCache.defenceConditions.minClanMembers),
             isNotReady=secondConditionNotReady,
         )
     )
     fortCondition = firstConditionMsg
     secondCondition = secondConditionMsg
     settingsBlockTop = self.__makeSettingsBlockVO(True)
     settingsBlockBottom = self.__makeSettingsBlockVO(False)
     result = {
         "titleText": titleText,
         "description": description,
         "conditionTitle": conditionTitle,
         "firstCondition": fortCondition,
         "secondCondition": secondCondition,
         "conditionsText": conditionsText,
         "fortConditionsText": fortConditionsText,
         "defenceConditionsText": defenceConditionsText,
         "attackConditionsText": attackConditionsText,
         "isBtnEnabled": self.__checkConditions(),
         "btnToolTipData": self.__getButtonToolTip(),
         "firstStatus": firstConditionIcon,
         "secondStatus": secondConditionIcon,
         "settingsBlockTop": settingsBlockTop,
         "settingsBlockBottom": settingsBlockBottom,
     }
     self.as_setDataForNotActivatedS(result)
Ejemplo n.º 26
0
 def __makeVO(self, data):
     creditsDiff = '+ %s' % BigWorld.wg_getNiceNumberFormat(
         data.creditsDiff)
     xpDiff = '+ %s' % BigWorld.wg_getNiceNumberFormat(data.xpDiff)
     premStr = text_styles.neutral(BATTLE_RESULTS.GETPREMIUMPOPOVER_PREM)
     awardStr = text_styles.neutral(BATTLE_RESULTS.GETPREMIUMPOPOVER_AWARD)
     descriptionText = _ms(BATTLE_RESULTS.GETPREMIUMPOPOVER_DESCRIPTIONTEXT,
                           prem=premStr,
                           award=awardStr)
     prbDispatcher = g_prbLoader.getDispatcher()
     isNavigationEnabled = True
     if prbDispatcher:
         isNavigationEnabled = not prbDispatcher.getFunctionalState(
         ).isNavigationDisabled()
     result = {
         'arenaUniqueID': data.arenaUniqueID,
         'headerTF': {
             'htmlText':
             text_styles.highTitle(
                 BATTLE_RESULTS.GETPREMIUMPOPOVER_HEADERTEXT)
         },
         'creditsTF': {
             'htmlText': text_styles.promoTitle(creditsDiff)
         },
         'creditsIcon': {
             'source': RES_ICONS.MAPS_ICONS_LIBRARY_CREDITSICONBIG_1
         },
         'xpTF': {
             'htmlText': text_styles.promoTitle(xpDiff)
         },
         'xpIcon': {
             'source': RES_ICONS.MAPS_ICONS_LIBRARY_XPICONBIG_1
         },
         'descriptionTF': {
             'htmlText': text_styles.main(descriptionText)
         },
         'actionBtn': {
             'label': BATTLE_RESULTS.GETPREMIUMPOPOVER_ACTIONBTN_LABEL,
             'enabled': isNavigationEnabled
         }
     }
     return result
def getTitleVO(vehicle):
    baseVO = getBaseTitleVO(vehicle)
    tankUserName = vehicle.userName
    titleRes = R.strings.veh_post_progression.vehPostProgressionCmpView.title()
    baseVO.update({
        'tankNameStr':
        text_styles.grandTitle(backport.text(titleRes, title=tankUserName)),
        'tankNameStrSmall':
        text_styles.promoTitle(backport.text(titleRes, title=tankUserName))
    })
    return baseVO
Ejemplo n.º 28
0
 def __packSeasonAwardBlock(cls, seasonData):
     passedCycles = text_styles.promoTitle(seasonData['passedCycles'])
     totalCycles = text_styles.highTitle(seasonData['totalCycles'])
     delimiter = text_styles.highTitle(' / ')
     value = passedCycles + delimiter + totalCycles
     return cls.__packBlockData(
         _AWARD_BLOCK_IDS.SEASON_AWARDS, {
             'image':
             RES_ICONS.
             MAPS_ICONS_RANKEDBATTLES_RANKEDBATTESVIEW_GIFT_BOX_208X100,
             'header':
             text_styles.highTitle(
                 RANKED_BATTLES.
                 RANKEDBATTLEVIEW_AWARDBLOCK_SEASONAWARD_HEADER),
             'description':
             text_styles.main(
                 RANKED_BATTLES.
                 RANKEDBATTLEVIEW_AWARDBLOCK_SEASONAWARD_DESCRIPTION),
             'value':
             text_styles.promoTitle(value)
         })
Ejemplo n.º 29
0
 def __packQuestAwardBlock(cls, battlesLeft):
     if battlesLeft is not None:
         value = text_styles.promoTitle(battlesLeft)
         description = RANKED_BATTLES.RANKEDBATTLEVIEW_AWARDBLOCK_QUEST_DESCRIPTION_BATTLESLEFT
     else:
         description = RANKED_BATTLES.RANKEDBATTLEVIEW_AWARDBLOCK_QUEST_DESCRIPTION_NOQUEST
         value = ''
     return cls.__packBlockData(_AWARD_BLOCK_IDS.BOOBY_QUEST, {'image': RES_ICONS.MAPS_ICONS_RANKEDBATTLES_RANKEDBATTESVIEW_ICON_RANKS_TASK_208X100,
      'header': text_styles.highTitle(RANKED_BATTLES.RANKEDBATTLEVIEW_AWARDBLOCK_QUEST_HEADER),
      'description': text_styles.main(description),
      'value': value,
      'isAvailable': battlesLeft is not None})
Ejemplo n.º 30
0
 def _populate(self):
     super(QuestsPersonalWelcomeView, self)._populate()
     self.as_setDataS({
         'buttonLbl':
         QUESTS.QUESTSPERSONALWELCOMEVIEW_BTNLABEL,
         'titleText':
         text_styles.promoTitle(
             i18n.makeString(
                 QUESTS.QUESTSPERSONALWELCOMEVIEW_MAINTITLE_TEXTLABEL)),
         'blockData':
         self.__makeBlocksData()
     })
Ejemplo n.º 31
0
 def _updateDetailedInfo(self):
     clanID = self.__selectedClan.getClanDbID()
     clanName = formatField(self.__selectedClan.getClanFullName)
     rating = formatField(getter=self.__selectedClan.getPersonalRating, formatter=BigWorld.wg_getIntegralFormat)
     battlesCount = formatField(getter=self.__selectedClan.getBattlesCount, formatter=BigWorld.wg_getIntegralFormat)
     wins = formatField(getter=self.__selectedClan.getBattleXpAvg, formatter=lambda value: BigWorld.wg_getNiceNumberFormat(value) + '%')
     avgExp = formatField(getter=self.__selectedClan.getBattlesPerformanceAvg, formatter=BigWorld.wg_getIntegralFormat)
     stats = [_packItemData(battlesCount, CLANS.SEARCH_INFO_STATS_BATTLES, CLANS.SEARCH_INFO_STATS_BATTLES_TOOLTIP, 'avgBattlesCount40x32.png'), _packItemData(wins, CLANS.SEARCH_INFO_STATS_WINS, CLANS.SEARCH_INFO_STATS_WINS_TOOLTIP, 'avgWins40x32.png'), _packItemData(avgExp, CLANS.SEARCH_INFO_STATS_AVGEXP, CLANS.SEARCH_INFO_STATS_AVGEXP_TOOLTIP, 'avgExp40x32.png')]
     self.as_setDataS({'clanId': clanID,
      'clanName': clanName,
      'ratingTitle': text_styles.main(CLANS.SEARCH_INFO_RATINGTITLE),
      'rating': text_styles.promoTitle(rating),
      'stats': stats})
Ejemplo n.º 32
0
 def _updateDetailedInfo(self):
     clanID = self.__selectedClan.getClanDbID()
     clanName = formatField(self.__selectedClan.getClanFullName)
     creationDate = formatField(getter=self.__selectedClan.getCreationDate, formatter=BigWorld.wg_getShortDateFormat)
     rating = formatField(getter=self.__selectedClan.getPersonalRating, formatter=BigWorld.wg_getIntegralFormat)
     battlesCount = formatField(getter=self.__selectedClan.getBattlesCount, formatter=BigWorld.wg_getIntegralFormat)
     wins = formatField(getter=self.__selectedClan.getBattleXpAvg, formatter=lambda value: BigWorld.wg_getNiceNumberFormat(value) + '%')
     avgExp = formatField(getter=self.__selectedClan.getBattlesPerformanceAvg, formatter=BigWorld.wg_getIntegralFormat)
     stats = [_packItemData(battlesCount, CLANS.SEARCH_INFO_STATS_BATTLES, CLANS.SEARCH_INFO_STATS_BATTLES_TOOLTIP, 'avgBattlesCount40x32.png'), _packItemData(wins, CLANS.SEARCH_INFO_STATS_WINS, CLANS.SEARCH_INFO_STATS_WINS_TOOLTIP, 'avgWins40x32.png'), _packItemData(avgExp, CLANS.SEARCH_INFO_STATS_AVGEXP, CLANS.SEARCH_INFO_STATS_AVGEXP_TOOLTIP, 'avgExp40x32.png')]
     self.as_setDataS({'clanId': clanID,
      'clanName': clanName,
      'creationDate': text_styles.main(_ms(CLANS.SEARCH_INFO_CREATIONDATE, date=creationDate)),
      'rating': text_styles.promoTitle(rating),
      'stats': stats})
Ejemplo n.º 33
0
 def _populate(self):
     super(CyberSportIntroView, self)._populate()
     self.addListener(CSVehicleSelectEvent.VEHICLE_SELECTED, self.__updateSelectedVehicles)
     self.as_setTextsS({'titleLblText': text_styles.promoTitle(CYBERSPORT.WINDOW_INTRO_TITLE),
      'descrLblText': text_styles.main(CYBERSPORT.WINDOW_INTRO_DESCRIPTION),
      'listRoomTitleLblText': text_styles.promoSubTitle(CYBERSPORT.WINDOW_INTRO_SEARCH_TITLE),
      'listRoomDescrLblText': text_styles.main(CYBERSPORT.WINDOW_INTRO_SEARCH_DESCRIPTION),
      'listRoomBtnLabel': _ms(CYBERSPORT.WINDOW_INTRO_SEARCH_BTN),
      'autoTitleLblText': text_styles.middleTitle(CYBERSPORT.WINDOW_INTRO_AUTO_TITLE),
      'autoDescrLblText': text_styles.main(CYBERSPORT.WINDOW_INTRO_AUTO_DESCRIPTION),
      'vehicleBtnTitleTfText': text_styles.standard(CYBERSPORT.BUTTON_CHOOSEVEHICLES_SELECTED)})
     self.__updateClubData()
     self.__updateAutoSearchVehicle(self.__getSelectedVehicles())
     self.startMyClubListening()
 def __setData(self):
     detailedData = getDetailedMissionData(self._quest)
     status = MISSIONS_STATES.COMPLETED
     isFinal = self._quest.isFinal()
     if self._isAwardListUsed:
         count = text_styles.stats(
             str(self._quest.getPawnCost()) +
             getHtmlAwardSheetIcon(self._quest.getQuestBranch()))
         statusLabel = text_styles.bonusAppliedText(
             _ms(QUESTS.PERSONALMISSION_STATUS_DONEWITHPAWN, count=count))
     elif self._mainReward and self._addReward:
         statusLabel = text_styles.bonusAppliedText(
             QUESTS.PERSONALMISSION_STATUS_FULLDONE)
         status = MISSIONS_STATES.FULL_COMPLETED
     elif self._addReward:
         statusLabel = text_styles.bonusAppliedText(
             QUESTS.PERSONALMISSION_STATUS_ONLYADDDONE)
         status = MISSIONS_STATES.FULL_COMPLETED
     else:
         statusLabel = text_styles.bonusAppliedText(
             QUESTS.PERSONALMISSION_STATUS_ONLYMAINDONE)
     questText = _ms(_PM.QUESTAWARDSCREEN_QUEST,
                     quest=self._quest.getShortUserName())
     dataVO = {
         'bgImage':
         _OPERATION_ID_TO_UI_BACKGROUND.get(self._quest.getOperationID(),
                                            ''),
         'operationText':
         text_styles.promoTitle(
             _ms(_PM.QUESTAWARDSCREEN_OPERATION,
                 operation=self._operation.getUserName())),
         'questText':
         toUpper(questText),
         'statusLabel':
         statusLabel,
         'status':
         status,
         'ribbonData': {
             'ribbonType': 'ribbon1',
             'rendererLinkage': 'RibbonAwardAnimUI',
             'gap': 20,
             'rendererWidth': 80,
             'rendererHeight': 80,
             'awards': self.__packAwards(detailedData)
         }
     }
     dataVO.update(self.__packQuestConditions(detailedData))
     dataVO.update(self.__packNextQuestTitleSection(isFinal))
     dataVO.update(self.__packButtonsSection(isFinal))
     self.as_setDataS(dataVO)
Ejemplo n.º 35
0
 def _populate(self):
     super(BadgesPage, self)._populate()
     userName = BigWorld.player().name
     self.as_setStaticDataS({
         'header': {
             'closeBtnLabel':
             BADGE.BADGESPAGE_HEADER_CLOSEBTN_LABEL,
             'descrTf':
             text_styles.main(BADGE.BADGESPAGE_HEADER_DESCR),
             'playerText':
             text_styles.promoTitle(
                 self.lobbyContext.getPlayerFullName(userName))
         }
     })
     self.__updateBadges()
     self.itemsCache.onSyncCompleted += self.__onItemsChanged
def getTitleVO(vehicle):
    baseVO = getBaseTitleVO(vehicle)
    tankTier = int2roman(vehicle.level)
    baseVO.update({
        'showInfoIcon':
        True,
        'tankTierStr':
        text_styles.grandTitle(tankTier),
        'tankTierStrSmall':
        text_styles.promoTitle(tankTier),
        'typeIconPath':
        getTypeBigIconPath(vehicle.type, vehicle.isElite),
        'isElite':
        vehicle.isElite
    })
    return baseVO
Ejemplo n.º 37
0
 def _populate(self):
     super(CyberSportIntroView, self)._populate()
     self.addListener(CSVehicleSelectEvent.VEHICLE_SELECTED, self.__updateSelectedVehicles)
     self.as_setTextsS({'titleLblText': text_styles.promoTitle(CYBERSPORT.WINDOW_INTRO_TITLE),
      'descrLblText': text_styles.main(CYBERSPORT.WINDOW_INTRO_DESCRIPTION),
      'listRoomTitleLblText': text_styles.promoSubTitle(CYBERSPORT.WINDOW_INTRO_SEARCH_TITLE),
      'listRoomDescrLblText': text_styles.main(CYBERSPORT.WINDOW_INTRO_SEARCH_DESCRIPTION),
      'listRoomBtnLabel': _ms(CYBERSPORT.WINDOW_INTRO_SEARCH_BTN),
      'autoTitleLblText': text_styles.middleTitle(CYBERSPORT.WINDOW_INTRO_AUTO_TITLE),
      'autoDescrLblText': text_styles.main(CYBERSPORT.WINDOW_INTRO_AUTO_DESCRIPTION),
      'vehicleBtnTitleTfText': text_styles.standard(CYBERSPORT.BUTTON_CHOOSEVEHICLES_SELECTED),
      'regulationsInfoText': '{0}{1}'.format(icons.info(), text_styles.main(CYBERSPORT.LADDERREGULATIONS_INFO)),
      'regulationsInfoTooltip': TOOLTIPS_CONSTANTS.LADDER_REGULATIONS})
     self.__updateClubData()
     self.__updateAutoSearchVehicle(self.__getSelectedVehicles())
     self.startMyClubListening()
     self.clubsCtrl.getAvailabilityCtrl().onStatusChanged += self.onStatusChanged
Ejemplo n.º 38
0
 def __initControls(self):
     headers = [
         _packHeaderColumnData('clan',
                               CLANS.SEARCH_TABLE_CLAN,
                               244,
                               CLANS.SEARCH_TABLE_CLAN_TOOLTIP,
                               textAlign='left'),
         _packHeaderColumnData('players', CLANS.SEARCH_TABLE_PLAYERS, 107,
                               CLANS.SEARCH_TABLE_PLAYERS_TOOLTIP),
         _packHeaderColumnData('creationDate',
                               CLANS.SEARCH_TABLE_CREATIONDATE, 125,
                               CLANS.SEARCH_TABLE_CREATIONDATE_TOOLTIP),
         _packHeaderColumnData('rating', CLANS.SEARCH_TABLE_RATING, 90,
                               CLANS.SEARCH_TABLE_RATING_TOOLTIP, False,
                               'right')
     ]
     self.as_setInitDataS({
         'windowTitle':
         CLANS.SEARCH_WINDOWTITLE,
         'title':
         text_styles.promoTitle(_ms(CLANS.SEARCH_TITLE)),
         'titleDescription':
         text_styles.main(_ms(CLANS.SEARCH_TITLEDESCRIPTION)),
         'searchBtnLabel':
         CLANS.SEARCH_SEARCHBTN,
         'searchBtnTooltip':
         CLANS.SEARCH_SEARCHBTN_TOOLTIP,
         'searchInputPrompt':
         CLANS.SEARCH_SEARCHINPUTPROMPT,
         'searchInputMaxChars':
         _SEARCH_MAX_CHARS,
         'nextBtnLabel':
         CLANS.SEARCH_NEXTBTN,
         'nextBtnTooltip':
         CLANS.SEARCH_NEXTBTN_TOOLTIP,
         'previousBtnLabel':
         CLANS.SEARCH_PREVIOUSBTN,
         'previousBtnTooltip':
         CLANS.SEARCH_PREVIOUSBTN_TOOLTIP,
         'tableHeaders':
         headers
     })
     self._showDummy(True)
     self._setDummyData(CLANS.SEARCH_PROMOTEXT_HEADER,
                        CLANS.SEARCH_PROMOTEXT_BODY, None)
     return
 def _populate(self):
     super(QuestsPersonalWelcomeView, self)._populate()
     falloutEnabled = g_lobbyContext.getServerSettings().isFalloutQuestEnabled()
     if falloutEnabled:
         announcementIcon = ARENA_GUI_TYPE_LABEL.LABELS[ARENA_GUI_TYPE.FALLOUT_CLASSIC]
         announcementText = text_styles.promoSubTitle(QUESTS.QUESTSPERSONALWELCOMEVIEW_ANNOUNCEMENTTEXT)
         background = RES_ICONS.MAPS_ICONS_QUESTS_PROMOSCREEN_FALLOUT
     else:
         announcementIcon = None
         announcementText = None
         background = RES_ICONS.MAPS_ICONS_QUESTS_PROMOSCREEN
     self.as_setDataS({'buttonLbl': QUESTS.QUESTSPERSONALWELCOMEVIEW_BTNLABEL,
      'titleText': text_styles.promoTitle(i18n.makeString(QUESTS.QUESTSPERSONALWELCOMEVIEW_MAINTITLE_TEXTLABEL)),
      'blockData': self.__makeBlocksData(),
      'showAnnouncement': falloutEnabled,
      'announcementIcon': announcementIcon,
      'announcementText': announcementText,
      'background': background})
     return
Ejemplo n.º 40
0
 def __initControls(self):
     headers = [_packHeaderColumnData('clan', CLANS.SEARCH_TABLE_CLAN, 244, CLANS.SEARCH_TABLE_CLAN_TOOLTIP, textAlign='left'),
      _packHeaderColumnData('players', CLANS.SEARCH_TABLE_PLAYERS, 107, CLANS.SEARCH_TABLE_PLAYERS_TOOLTIP),
      _packHeaderColumnData('creationDate', CLANS.SEARCH_TABLE_CREATIONDATE, 125, CLANS.SEARCH_TABLE_CREATIONDATE_TOOLTIP),
      _packHeaderColumnData('rating', CLANS.SEARCH_TABLE_RATING, 90, CLANS.SEARCH_TABLE_RATING_TOOLTIP, False, 'right')]
     self.as_setInitDataS({'windowTitle': CLANS.SEARCH_WINDOWTITLE,
      'title': text_styles.promoTitle(_ms(CLANS.SEARCH_TITLE)),
      'titleDescription': text_styles.main(_ms(CLANS.SEARCH_TITLEDESCRIPTION)),
      'searchBtnLabel': CLANS.SEARCH_SEARCHBTN,
      'searchBtnTooltip': CLANS.SEARCH_SEARCHBTN_TOOLTIP,
      'searchInputPrompt': CLANS.SEARCH_SEARCHINPUTPROMPT,
      'searchInputMaxChars': _SEARCH_MAX_CHARS,
      'nextBtnLabel': CLANS.SEARCH_NEXTBTN,
      'nextBtnTooltip': CLANS.SEARCH_NEXTBTN_TOOLTIP,
      'previousBtnLabel': CLANS.SEARCH_PREVIOUSBTN,
      'previousBtnTooltip': CLANS.SEARCH_PREVIOUSBTN_TOOLTIP,
      'tableHeaders': headers})
     self._showDummy(True)
     self._setDummyData(CLANS.SEARCH_PROMOTEXT_HEADER, CLANS.SEARCH_PROMOTEXT_BODY, None)
     return
Ejemplo n.º 41
0
 def __updateNotActivatedView(self):
     _ms = i18n.makeString
     titleText = text_styles.promoTitle(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_TITLE))
     description = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_DESCRIPTION))
     conditionTitle = text_styles.middleTitle(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONTITLE))
     firstConditionIcon = icons.checkmark()
     secondConditionIcon = icons.checkmark()
     conditionsText = text_styles.middleTitle(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS))
     fortConditionsText = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS_FORTLEVEL))
     defenceConditionsText = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS_DEFENCE))
     attackConditionsText = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_CONDITIONS_ATTACK))
     firstConditionNotReady = ''
     secondConditionNotReady = ''
     if not self.__checkBaseLevel():
         firstConditionIcon = text_styles.standard('-')
         firstConditionNotReady = text_styles.error(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_ISNOTREADY))
     if not self.__checkPlayerCount():
         secondConditionIcon = text_styles.standard('-')
         secondConditionNotReady = text_styles.error(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_ISNOTREADY))
     firstConditionMsg = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_BASELEVELCONDITION, level=fort_formatters.getTextLevel(g_fortCache.defenceConditions.minRegionLevel), isNotReady=firstConditionNotReady))
     secondConditionMsg = text_styles.main(_ms(FORTIFICATIONS.SETTINGSWINDOW_NOTACTIVATED_PLAYERCOUNTCONDITION, membersCount=BigWorld.wg_getNiceNumberFormat(g_fortCache.defenceConditions.minClanMembers), isNotReady=secondConditionNotReady))
     fortCondition = firstConditionMsg
     secondCondition = secondConditionMsg
     settingsBlockTop = self.__makeSettingsBlockVO(True)
     settingsBlockBottom = self.__makeSettingsBlockVO(False)
     result = {'titleText': titleText,
      'description': description,
      'conditionTitle': conditionTitle,
      'firstCondition': fortCondition,
      'secondCondition': secondCondition,
      'conditionsText': conditionsText,
      'fortConditionsText': fortConditionsText,
      'defenceConditionsText': defenceConditionsText,
      'attackConditionsText': attackConditionsText,
      'isBtnEnabled': self.__checkConditions(),
      'btnToolTipData': self.__getButtonToolTip(),
      'firstStatus': firstConditionIcon,
      'secondStatus': secondConditionIcon,
      'settingsBlockTop': settingsBlockTop,
      'settingsBlockBottom': settingsBlockBottom}
     self.as_setDataForNotActivatedS(result)
Ejemplo n.º 42
0
 def _populate(self):
     super(BadgesPage, self)._populate()
     userName = BigWorld.player().name
     self.as_setStaticDataS({
         'header': {
             'closeBtnLabel':
             BADGE.BADGESPAGE_HEADER_CLOSEBTN_LABEL,
             'playerText':
             text_styles.middleTitle(
                 self.lobbyContext.getPlayerFullName(userName)),
             'titleText':
             text_styles.promoTitle(BADGE.TITLETEXT),
             'descText':
             text_styles.main(BADGE.DESCTEXT)
         }
     })
     self.__updateBadges()
     g_clientUpdateManager.addCallbacks(
         {'stats.dossier': self.__dossierUpdateCallBack})
     self.lobbyContext.getServerSettings(
     ).onServerSettingsChange += self.__onServerSettingChanged
 def getBuyBtnDiscountData(self, discount, hasIgbLink):
     discountText = text_styles.discountText(
         backport.text(R_BUYING_PANEL.customOffer.discount()))
     discountValue = text_styles.promoTitle(
         backport.text(R.strings.quests.action.discount.percent(),
                       value=backport.getIntegralFormat(discount)))
     return {
         'enabled':
         True,
         'label':
         backport.text(R_BUYING_PANEL.buyBtn.label.buy()),
         'btnIcon':
         None if hasIgbLink else backport.image(
             R.images.gui.maps.icons.library.buyInWeb()),
         'btnIconAlign':
         BUYING_BUTTON_ICON_ALIGN,
         'btnTooltip':
         makeTooltip(body=backport.text(
             R_BUYING_PANEL.buyBtn.tooltip.active.body())),
         'customOffer':
         ' '.join((discountText, discountValue))
     }
Ejemplo n.º 44
0
 def __getHeaderData(self):
     return {'closeBtnLabel': VEHICLE_PREVIEW.HEADER_CLOSEBTN_LABEL,
      'backBtnLabel': VEHICLE_PREVIEW.HEADER_BACKBTN_LABEL,
      'backBtnDescrLabel': self.__getBackBtnLabel(),
      'titleText': text_styles.promoTitle(VEHICLE_PREVIEW.HEADER_TITLE)}
 def _populate(self):
     super(ReferralReferrerIntroWindow, self)._populate()
     blocks = [self.__packContentBlock('invite_block', RES_ICONS.MAPS_ICONS_LIBRARY_REFERRALINVITEICON_1, ctx={'inviteCount': self.__invitesCount,
       'link': self.__makeHyperLink(OpenLinkEvent.INVIETES_MANAGEMENT, MENU.REFERRALREFERRERINTROWINDOW_TEXTBLOCK_LINK)}, showLinkBtn=True), self.__packContentBlock('squad_block', RES_ICONS.MAPS_ICONS_BATTLETYPES_40X40_SQUAD), self.__packContentBlock('referrals_block', RES_ICONS.MAPS_ICONS_REFERRAL_REFERRALHAND, ctx={'icon': icons.makeImageTag(RES_ICONS.MAPS_ICONS_REFERRAL_REFERRALSMALLHAND, 16, 16, -4, 0)})]
     self.as_setDataS({'titleMsg': text_styles.promoTitle(i18n.makeString(MENU.REFERRALREFERRERINTROWINDOW_TITLEMESSAGE)),
      'blocksVOs': blocks})
Ejemplo n.º 46
0
 def getDescription(self):
     if self._isAddReward:
         key = '#menu:awardWindow/personalMission/completeWithHonors'
     else:
         key = '#menu:awardWindow/personalMission/complete'
     return text_styles.promoTitle(key)
Ejemplo n.º 47
0
 def getDescription(self):
     return text_styles.promoTitle('#menu:awardWindow/mission/complete')
 def _populate(self):
     super(QuestsPersonalWelcomeView, self)._populate()
     self.as_setDataS({'buttonLbl': QUESTS.QUESTSPERSONALWELCOMEVIEW_BTNLABEL,
      'titleText': text_styles.promoTitle(i18n.makeString(QUESTS.QUESTSPERSONALWELCOMEVIEW_MAINTITLE_TEXTLABEL)),
      'blockData': self.__makeBlocksData()})