def getBlueprintLabel(self):
     bpfProps = self.getBpfProps()
     label = ''
     if bpfProps is not None:
         label = text_styles.counterLabelText(' '.join(
             (str(bpfProps.filledCount), '/', str(bpfProps.totalCount))))
     return label
Пример #2
0
 def __setCounter(self, alias, counter=None):
     """ Show the notification counter for the given tab alias.
     """
     if not self.hasCounter(alias):
         return
     self.__shownCounters.add(alias)
     counter = counter or i18n.makeString(MENU.HEADER_NOTIFICATIONSIGN)
     self.as_setButtonCounterS(alias, text_styles.counterLabelText(counter))
Пример #3
0
 def _buildVehicle(self, vehicle):
     result = super(RankedCarouselDataProvider, self)._buildVehicle(vehicle)
     rank = self.rankedController.getCurrentRank(vehicle)
     if rank.getType() == RANK_TYPES.VEHICLE:
         result['vehRankVisible'] = True
         rankId = rank.getSerialID()
         if rankId > 1:
             result['vehRankLabel'] = text_styles.counterLabelText(rankId)
     state, _ = vehicle.getState()
     if state == Vehicle.VEHICLE_STATE.UNSUITABLE_TO_QUEUE:
         result['lockedTooltip'] = makeTooltip(
             RANKED_BATTLES.RANKEDBATTLESCAROUSEL_LOCKEDTOOLTIP_HEADER,
             RANKED_BATTLES.RANKEDBATTLESCAROUSEL_LOCKEDTOOLTIP_BODY)
     return result
Пример #4
0
 def __setCounter(self, alias):
     text = i18n.makeString(MENU.HEADER_NOTIFICATIONSIGN)
     self.as_setButtonCounterS(alias, text_styles.counterLabelText(text))
Пример #5
0
 def __setState(self, count):
     counterValue = ''
     if count > 0:
         counterValue = text_styles.counterLabelText(str(count))
     self.as_setStateS(count > 0, counterValue)
Пример #6
0
 def __setCounter(self, alias):
     text = i18n.makeString(MENU.HEADER_NOTIFICATIONSIGN)
     self.as_setButtonCounterS(alias, text_styles.counterLabelText(text))
 def __setState(self, count):
     counterValue = ''
     if count > 0:
         counterValue = text_styles.counterLabelText(str(count))
     self.as_setStateS(count > 0, counterValue)