def _packDescriptionBlock(self, isNonHistoric, isInfo): img = RES_ICONS.MAPS_ICONS_CUSTOMIZATION_NON_HISTORICAL nonHistoricTitle = VEHICLE_CUSTOMIZATION.CUSTOMIZATION_ITEMSPOPOVER_HISTORICCHECKBOX_ITEMS nonHistoricDesc = VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_DESCRIPTION_HISTORIC_FALSE_DESCRIPTION seasonName = SEASON_TYPE_TO_NAME.get( self.service.getCtx().currentSeason) mapName = _ms(VEHICLE_CUSTOMIZATION.getMapName(seasonName)) title = _ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_ITEMSPOPOVER_BTN) desc = _ms(VEHICLE_CUSTOMIZATION.SEASON_SELECTION_TOOLTIP, mapName=mapName) blocks = [] if not isInfo: blocks.append( formatters.packTextBlockData( text=text_styles.middleTitle(title))) blocks.append( formatters.packTextBlockData(text=text_styles.main(desc), padding={'top': 10})) if isNonHistoric: blocks.append( formatters.packImageTextBlockData( title=text_styles.middleTitle(nonHistoricTitle), img=img, imgPadding={ 'left': -3, 'top': -4 }, padding={'top': 20 if not isInfo else 0})) blocks.append( formatters.packTextBlockData( text=text_styles.main(nonHistoricDesc))) return formatters.packBuildUpBlockData(blocks, gap=-6, padding={'bottom': -5})
def __updatePopoverBtnIcon(self): if self.__ctx.modeId == CustomizationModes.STYLED: imgSrc = RES_ICONS.MAPS_ICONS_CUSTOMIZATION_ITEMS_POPOVER_DEFAULT_LIST30X16 else: imgSrc = RES_ICONS.MAPS_ICONS_CUSTOMIZATION_ITEMS_POPOVER_DESERT_LIST30X16 if self.__ctx.season == SeasonType.WINTER: imgSrc = RES_ICONS.MAPS_ICONS_CUSTOMIZATION_ITEMS_POPOVER_WINTER_LIST30X16 elif self.__ctx.season == SeasonType.SUMMER: imgSrc = RES_ICONS.MAPS_ICONS_CUSTOMIZATION_ITEMS_POPOVER_SUMMER_LIST30X16 if self.__ctx.modeId == CustomizationModes.STYLED: tooltip = VEHICLE_CUSTOMIZATION.CUSTOMIZATION_ITEMSPOPOVER_BTN_STYLE_DISABLED else: seasonName = SEASON_TYPE_TO_NAME.get(self.__ctx.season) mapName = VEHICLE_CUSTOMIZATION.getMapName(seasonName) tooltip = _ms( VEHICLE_CUSTOMIZATION.CUSTOMIZATION_ITEMSPOPOVER_BTN_DISABLED, mapType=_ms(mapName)) self.as_showPopoverBtnIconS(imgSrc, tooltip)