def _packBlocks(self, *args, **kwargs):
     items = super(BattleProgressionTooltipData,
                   self)._packBlocks(*args, **kwargs)
     titleStr = text_styles.highTitle(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.title()))
     titleDescrStr = text_styles.neutral(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.titleDescr()))
     items.append(
         formatters.packItemTitleDescBlockData(title=titleStr,
                                               desc=titleDescrStr,
                                               txtGap=5))
     highlight1Str = text_styles.neutral(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.noteHighlight1()))
     highlight2Str = text_styles.neutral(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.noteHighlight2()))
     noteStr = text_styles.main(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.note(),
                       highlight1=highlight1Str,
                       highlight2=highlight2Str))
     noteBlock = formatters.packTextBlockData(text=noteStr)
     items.append(
         formatters.packBuildUpBlockData(
             blocks=[noteBlock],
             linkage=BLOCKS_TOOLTIP_TYPES.
             TOOLTIP_BUILDUP_BLOCK_WHITE_BG_LINKAGE))
     tutorialHighlightStr = text_styles.neutral(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.tutorialHighlight()))
     treeKey = text_styles.alert(
         getHotKeyString(CommandMapping.CMD_UPGRADE_PANEL_SHOW))
     leftModuleKey = text_styles.alert(
         getHotKeyString(CommandMapping.CMD_CM_VEHICLE_UPGRADE_PANEL_LEFT))
     rightModuleKey = text_styles.alert(
         getHotKeyString(CommandMapping.CMD_CM_VEHICLE_UPGRADE_PANEL_RIGHT))
     tutorialStr = text_styles.main(
         backport.text(R.strings.battle_royale.hangarVehicleInfo.tooltips.
                       battleProgression.tutorial(),
                       treeKey=treeKey,
                       leftModuleKey=leftModuleKey,
                       rightModuleKey=rightModuleKey))
     tutorialStr = text_styles.concatStylesWithSpace(
         tutorialHighlightStr, tutorialStr)
     items.append(formatters.packTextBlockData(text=tutorialStr))
     return items
Esempio n. 2
0
 def __updateUpgrades(self):
     upgrades = self.__getUpgradeItems()
     self.__upgrades = []
     if upgrades:
         hasTwoModules = len(upgrades) == 2
         if hasTwoModules:
             self.__upgrades = [ upgrade.intCD for upgrade in upgrades ]
             first = upgrades[0]
             second = upgrades[1]
             if isItemVehicleHull(first.intCD, self._getVehicle()):
                 titleKey = R.strings.battle_royale.upgradePanel.title.hull
             else:
                 titleKey = R.strings.battle_royale.upgradePanel.title.dyn(first.itemTypeName, None)
                 if titleKey is None:
                     titleKey = R.strings.battle_royale.upgradePanel.title.default
             data = {'firstItem': self.__getModuleInfo(first, 0),
              'secondItem': self.__getModuleInfo(second, 1),
              'title': backport.text(titleKey())}
             if not self.__textInited:
                 key = br_helpers.getHotKeyString(CommandMapping.CMD_UPGRADE_PANEL_SHOW)
                 data['description'] = backport.text(R.strings.battle_royale.upgradePanel.description(), key=key)
                 data['isInitData'] = True
                 self.__textInited = True
             self.as_setDataS(data)
             self.__updateVisibility(hasTwoModules and avatar_getter.isVehicleAlive())
         else:
             logger.warning('Unexpected modules count. Modules list: %s', str(upgrades))
     else:
         self.__updateVisibility(False)
     return
 def _populate(self):
     super(HangarVehicleInfo, self)._populate()
     self.__battleRoyaleController.onUpdated += self.__onBattleRoyaleEnabledChanged
     self.startGlobalListening()
     self.as_setDataS({
         'btnCloseLabel':
         backport.text(
             R.strings.battle_royale.hangarVehicleInfo.closeBtn()),
         'infoIconSource':
         backport.image(R.images.gui.maps.icons.library.info()),
         'infoText':
         text_styles.highlightText(
             backport.text(
                 R.strings.battle_royale.hangarVehicleInfo.moduleTreeTip(),
                 key=text_styles.neutral(
                     br_helpers.getHotKeyString(
                         CommandMapping.CMD_UPGRADE_PANEL_SHOW)))),
         'vehTitle':
         text_styles.grandTitle(self.__vehicle.shortUserName),
         'vehTypeIcon':
         getTypeBigIconPath(self.__vehicle.type),
         'tutorialText':
         backport.text(
             R.strings.battle_royale.hangarVehicleInfo.tutorialText())
     })
Esempio n. 4
0
def _getTabData():
    return ({
        'viewId':
        BATTLEROYALE_ALIASES.VEH_MODULES_CONFIGURATOR_CMP,
        'label':
        backport.text(
            R.strings.battle_royale.hangarVehicleInfo.moduleTreeTab()),
        'linkage':
        'VehModuleConfiguratorCmpUI',
        'selected':
        True,
        'enabled':
        True,
        'tipText':
        text_styles.highlightText(
            backport.text(
                R.strings.battle_royale.hangarVehicleInfo.moduleTreeTip(),
                key=text_styles.neutral(
                    br_helpers.getHotKeyString(
                        CommandMapping.CMD_UPGRADE_PANEL_SHOW)))),
        'tooltipComplexStr':
        None,
        'tooltipSpecialId':
        TOOLTIPS_CONSTANTS.BATTLE_ROYALE_BATTLE_PROGRESSION
    }, {
        'viewId':
        BATTLEROYALE_ALIASES.VEHICLE_WEAK_ZONES_CMP,
        'label':
        backport.text(
            R.strings.battle_royale.hangarVehicleInfo.weakZonesTab()),
        'linkage':
        'VehicleWeakZonesCmpUI',
        'selected':
        False,
        'enabled':
        True,
        'tipText':
        text_styles.highlightText(
            backport.text(
                R.strings.battle_royale.hangarVehicleInfo.weakZonesTip())),
        'tooltipComplexStr':
        makeTooltip(
            header=backport.text(R.strings.battle_royale.hangarVehicleInfo.
                                 tooltips.weakZones.header()),
            body=backport.text(R.strings.battle_royale.hangarVehicleInfo.
                               tooltips.weakZones.body())),
        'tooltipSpecialId':
        None
    })