def __getTitleDescrTexts(self, currentElement): if self._slotID == GUI_ITEM_TYPE.STYLE: if not currentElement: titleText = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ELEMENTTYPE_ALL else: titleText = currentElement.userName elif self._slotID == GUI_ITEM_TYPE.MODIFICATION: titleText = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ELEMENTTYPE_ALL elif self._slotID == GUI_ITEM_TYPE.INSCRIPTION: titleText = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ELEMENTTYPE_INSCRIPTION elif self._slotID == GUI_ITEM_TYPE.EMBLEM: titleText = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ELEMENTTYPE_EMBLEM else: titleText = VEHICLE_CUSTOMIZATION.getSheetVehPartName( getCustomizationTankPartName(self._areaID, self._regionID)) if not currentElement: itemTypeID = TABS_ITEM_MAPPING.get(self.__ctx.currentTab) itemTypeName = GUI_ITEM_TYPE_NAMES[itemTypeID] descrText = text_styles.neutral( VEHICLE_CUSTOMIZATION.getSheetEmptyDescription(itemTypeName)) elif self._slotID == GUI_ITEM_TYPE.STYLE: descrText = text_styles.main(currentElement.userType) elif self._slotID == GUI_ITEM_TYPE.CAMOUFLAGE: descrText = text_styles.main(currentElement.userName) else: descrText = text_styles.main( _ms(VEHICLE_CUSTOMIZATION.PROPERTYSHEET_DESCRIPTION, itemType=currentElement.userType, itemName=currentElement.userName)) return (text_styles.highTitle(titleText), descrText)
def __makeSetOnOtherTankPartsRendererVO(self): if not self._isItemAppliedToAll: currPartName = VEHICLE_CUSTOMIZATION.getSheetVehPartName( getCustomizationTankPartName(self._areaID, self._regionID)) titleText = text_styles.standard( _ms(VEHICLE_CUSTOMIZATION.PROPERTYSHEET_TITLE_APPLIEDTO, elementType=text_styles.neutral(currPartName))) actionBtnLabel = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ACTIONBTN_APPLYTOWHOLETANK actionBtnIconSrc = '' extraPriceText = '' extraPriceCurrency = '' else: titleText = text_styles.neutral( VEHICLE_CUSTOMIZATION.PROPERTYSHEET_TITLE_ALLTANKPAINTED) actionBtnLabel = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ACTIONBTN_CANCEL actionBtnIconSrc = RES_ICONS.MAPS_ICONS_LIBRARY_ASSET_1 extraPriceCurrency = '' extraPriceText = '' if self._extraMoney: extraPriceCurrency = self._extraMoney.getCurrency() if self._extraMoney.get(extraPriceCurrency): extraPriceText = '{}{}'.format( currency.getStyle(extraPriceCurrency)('+'), currency.applyAll( extraPriceCurrency, self._extraMoney.get(extraPriceCurrency))) return { 'titleText': titleText, 'iconSrc': RES_ICONS.MAPS_ICONS_CUSTOMIZATION_PROPERTY_SHEET_TANK, 'actionBtnLabel': actionBtnLabel, 'actionBtnIconSrc': actionBtnIconSrc, 'isAppliedToAll': self._isItemAppliedToAll, 'actionType': CUSTOMIZATION_ALIASES. CUSTOMIZATION_SHEET_ACTION_APPLY_TO_ALL_PARTS, 'rendererLnk': CUSTOMIZATION_ALIASES.CUSTOMIZATION_SHEET_BTN_RENDERER_UI, 'extraPriceText': extraPriceText, 'extraPriceIcon': extraPriceCurrency }