예제 #1
0
 def _getPreformattedTankwomanBonus(self, operation):
     if not operation.isFullCompleted():
         current, total = _getTankwomansCountInOperation(operation)
         currentStr = text_styles.success(current) if current else text_styles.stats(current)
         images = dict(((size, RES_ICONS.getBonusIcon(size, 'tankwoman')) for size in AWARDS_SIZES.ALL()))
         return PreformattedBonus(bonusName=self._TANKWOMAN_BONUS, label='%s / %s' % (currentStr, str(total)), images=images, labelFormatter=text_styles.main)
     else:
         return None
예제 #2
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
예제 #3
0
 def _formatComplexToken(self, complexToken, token, bonus):
     rTokenAlias = R.strings.tooltips.quests.bonuses.token
     userName = self._getUserName(complexToken.styleID)
     tooltip = makeTooltip(
         backport.text(rTokenAlias.header(), userName=userName),
         backport.text(rTokenAlias.body()))
     return PreformattedBonus(bonusName=bonus.getName(),
                              images=self._getTokenImages(
                                  complexToken.styleID),
                              label=self._formatBonusLabel(token.count),
                              userName=backport.text(rTokenAlias.header(),
                                                     userName=userName),
                              labelFormatter=self._getLabelFormatter(bonus),
                              tooltip=tooltip,
                              align=LABEL_ALIGN.RIGHT,
                              isCompensation=self._isCompensation(bonus))