def getRatingVO(rating):
    resultVO = shared_vos.getRatingVO(rating)
    resultVO['label'] = text_styles.alignText(
        text_styles.mainBig(
            backport.text(R.strings.ranked_battles.rankedBattleMainView.stats.
                          rating.title())), 'center')
    return resultVO
Exemple #2
0
 def __formatFragmentProgress(self, current, total, discount):
     return text_styles.alignText(
         ''.join((text_styles.credits(backport.getIntegralFormat(current)),
                  text_styles.main(''.join(
                      (' / ', backport.getIntegralFormat(total)))),
                  text_styles.credits(''.join(
                      ('   ', backport.getIntegralFormat(discount),
                       '%'))) if discount > 0 else '')), 'right')
def getEfficiencyVO(currentSeasonEfficiency, currentSeasonEfficiencyDiff):
    resultVO = shared_vos.getEfficiencyVO(currentSeasonEfficiency,
                                          currentSeasonEfficiencyDiff)
    resultVO['label'] = text_styles.alignText(
        text_styles.mainBig(
            backport.text(R.strings.ranked_battles.rankedBattleMainView.stats.
                          seasonEfficiency())), 'center')
    return resultVO
Exemple #4
0
 def __packBottom(self, diff):
     text = text_styles.main(
         backport.text(R.strings.ranked_battles.questsTooltip.bottom(),
                       number=diff))
     return [
         formatters.packTextBlockData(text_styles.alignText(text, 'center'),
                                      padding=formatters.packPadding(
                                          top=-7, bottom=12))
     ] if diff > 0 else []
Exemple #5
0
 def __packStatusBlock(self):
     if self.__blueprintData.filledCount == 0:
         status = text_styles.warning(TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_EMPTYSTATUS)
     elif self.__blueprintData.filledCount == self.__blueprintData.totalCount:
         status = text_styles.statInfo(TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_COMPLETESTATUS)
     else:
         status = text_styles.statusAttention(TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_INCOMPLETESTATUS)
     status = text_styles.alignText(status, 'center')
     return formatters.packTextBlockData(text=status, padding=formatters.packPadding(top=5, bottom=-3))
def getRatingVO(rating, isMastered):
    resultVO = shared_vos.getRatingVO(rating)
    label = backport.text(R.strings.ranked_battles.rankedBattleMainView.stats.rating.title())
    value = resultVO['value']
    if not isMastered:
        label = backport.text(R.strings.ranked_battles.rankedBattleMainView.seasonGap.stats.outOfRating())
        value = ' '
    resultVO['label'] = text_styles.alignText(text_styles.mainBig(label), 'center')
    resultVO['value'] = value
    return resultVO
Exemple #7
0
 def _packBlocks(self, vehicleCD):
     items = super(BlueprintEmptySlotTooltipData, self)._packBlocks(vehicleCD)
     self.__vehicle, self.__blueprintData, _ = self.context.getVehicleBlueprintData(vehicleCD)
     _, _, self.__allianceName = self.context.getFragmentData(vehicleCD)
     items.extend([self.__packTitleBlock(), self.__packDiscountBlock(), self.__packDescriptionBlock()])
     intelRequired, nationRequired = self.context.getFragmentConvertData(self.__vehicle.level)
     items.append(self._packConversionFormulaBlock(intelRequired, nationRequired, self.__vehicle))
     if not self.__blueprintData.canConvert:
         statusStr = text_styles.critical(TOOLTIPS.BLUEPRINT_BLUEPRINTEMPTYSLOT_STATUSNOTENOUGH)
     else:
         statusStr = text_styles.statusAttention(TOOLTIPS.BLUEPRINT_BLUEPRINTEMPTYSLOT_STATUSENOUGH)
     statusStr = text_styles.alignText(statusStr, 'center')
     items.append(formatters.packTextBlockData(text=statusStr, padding=formatters.packPadding(top=5, bottom=-3)))
     return items
Exemple #8
0
def getStatVO(value, statKey, iconKey, tooltipKey):
    return {
        'icon':
        iconKey,
        'label':
        text_styles.alignText(
            text_styles.main(
                backport.text(
                    R.strings.ranked_battles.rankedBattleMainView.stats.dyn(
                        statKey)())), 'center'),
        'value':
        value,
        'tooltip':
        makeStatTooltip(tooltipKey)
    }
 def __packStatusBlock(self):
     if self.__vehicle.isUnlocked:
         status = text_styles.statInfo(
             TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_UNLOCKEDSTATUS)
     elif self.__blueprintData.filledCount == 0:
         status = text_styles.warning(
             TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_EMPTYSTATUS)
     elif self.__blueprintData.filledCount == self.__blueprintData.totalCount:
         status = text_styles.statInfo(
             TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_COMPLETESTATUS)
     else:
         status = text_styles.statusAttention(
             TOOLTIPS.BLUEPRINT_VEHICLEBLUEPRINTTOOLTIP_INCOMPLETESTATUS)
     status = text_styles.alignText(status, 'center')
     return formatters.packTextBlockData(text=status)
 def getDescription(self):
     return text_styles.alignText(text_styles.main(backport.text(R.strings.menu.awardWindow.vehicleCollector.description(), nation=_getNationName(self.__nationID))), _CENTER_ALIGN)
 def getHeader(self):
     return text_styles.promoTitle(text_styles.alignText(backport.text(R.strings.menu.awardWindow.vehicleCollector.header()), _CENTER_ALIGN))
 def getDescription(self):
     return text_styles.main(text_styles.alignText(i18n.makeString(MENU.AWARDWINDOW_RECRUITERAWARD_DESCRIPTION), _CENTER_ALIGN))
 def getHeader(self):
     return text_styles.promoTitle(text_styles.alignText(i18n.makeString(MENU.AWARDWINDOW_RECRUITERAWARD_HEADER), _CENTER_ALIGN))
 def getDescription(self):
     return text_styles.alignText(text_styles.main(backport.text(R.strings.menu.awardWindow.vehicleCollectorOfEverything.description())), _CENTER_ALIGN)
def getEfficiencyVO(currentSeasonEfficiency):
    return {'icon': 'efficiency',
     'label': text_styles.alignText(text_styles.mainBig(backport.text(R.strings.ranked_battles.rankedBattleMainView.seasonGap.stats.efficiency())), 'center'),
     'value': ranked_formatters.getFloatPercentStrStat(currentSeasonEfficiency)}