def __getModuleInfo(self, moduleItem, index): moduleInfo = {'header': getTreeModuleHeader(moduleItem), 'parameters': getShortListParameters(moduleItem, self._getVehicle()), 'module': {'icon': getTreeModuleIcon(moduleItem), 'intCD': moduleItem.intCD, 'available': True}} if not self.__textInited: moduleInfo['hotKeys'] = br_helpers.getHotKeyListByIndex(index) return moduleInfo
def __getModuleInfoPanel(self, intCD): itemTypeID, _, _ = parseIntCompactDescr(intCD) if itemTypeID != GUI_ITEM_TYPE.VEHICLE: module = self.__getModuleItem(intCD) if module is not None: return {'header': getTreeModuleHeader(module), 'parameters': getShortListParameters(module, self.__getProgressionVehicle(), self.__getInstalledOnVehicleAnalogByIntCD(intCD)), 'module': {'icon': getTreeModuleIcon(module), 'available': True}} return
def __constructModule(cls, module): block = [] moduleDescr = module.descriptor icon = getTreeModuleIcon(module) if icon: block.append( formatters.packAtlasIconTextBlockData( title=text_styles.highTitle(getTreeModuleHeader(module)), desc=text_styles.standard(moduleDescr.userString), atlas=ATLAS_CONSTANTS.COMMON_BATTLE_LOBBY, icon=icon, iconPadding=formatters.packPadding(right=12), txtGap=1, txtPadding=formatters.packPadding(top=7))) return block
def _makeModuleVO(item, selected): itemIntCD = item.intCD return _makeItemVO(itemIntCD, getTreeModuleIcon(item), selected)