Пример #1
0
 def _getPreformattedTankwomanBonus(self, operation):
     _, total = _getTankwomansCountInOperation(operation)
     return PreformattedBonus(
         bonusName=self._TANKWOMAN_BONUS,
         label=formatCountLabel(total),
         images=dict(
             ((size, RES_ICONS.getBonusIcon(size, self._TANKWOMAN_BONUS))
              for size in AWARDS_SIZES.ALL())),
         labelFormatter=text_styles.stats,
         align=LABEL_ALIGN.RIGHT,
         specialAlias=TOOLTIPS_CONSTANTS.PERSONAL_MISSIONS_TANKWOMAN,
         isSpecial=True,
         specialArgs=[]) if total else None
 def __packRankedToken(cls, model, bonus, *args):
     model.setUserName(
         backport.text(
             R.strings.tooltips.rankedBattleView.scorePoint.short.header()))
     model.setIconSmall(
         backport.image(
             R.images.gui.maps.icons.quests.bonuses.dyn(
                 AWARDS_SIZES.SMALL).dyn(cls._RANKED_TOKEN_SOURCE)()))
     model.setIconBig(
         backport.image(
             R.images.gui.maps.icons.quests.bonuses.dyn(
                 AWARDS_SIZES.BIG).dyn(cls._RANKED_TOKEN_SOURCE)()))
     model.setLabel(formatCountLabel(bonus.getCount()))
     return model