def construct(self): block = [] if self.configuration.params: comparator = params_helper.shellOnVehicleComparator( self.shell, self.configuration.vehicle) stockParams = params_helper.getParameters( self.itemsCache.items.getStockVehicle( self.configuration.vehicle.intCD)) for parameter in params_formatters.getRelativeDiffParams( comparator): delta = parameter.state[1] value = parameter.value if delta > 0: value -= delta block.append( formatters.packStatusDeltaBlockData( title=text_styles.middleTitle( MENU.tank_params(parameter.name)), valueStr=params_formatters.simlifiedDeltaParameter( parameter), statusBarData={ 'value': value, 'delta': delta, 'minValue': 0, 'markerValue': stockParams.get(parameter.name, value), 'maxValue': max(MAX_RELATIVE_VALUE, value + delta), 'useAnim': False }, padding=formatters.packPadding(left=75))) return block
def construct(self): blocks = [] for parameter in params_formatters.getRelativeDiffParams( self.__comparator): delta = parameter.state[1] value = parameter.value if delta > 0: value -= delta blocks.append( formatters.packStatusDeltaBlockData( title=text_styles.middleTitle( MENU.tank_params(parameter.name)), valueStr=params_formatters.simlifiedDeltaParameter( parameter), statusBarData={ 'value': value, 'delta': delta, 'minValue': 0, 'markerValue': self.__stockParams[parameter.name], 'maxValue': MAX_RELATIVE_VALUE, 'useAnim': False }, padding=formatters.packPadding(left=72, top=8))) return blocks
def construct(self): blocks = [] for parameter in params_formatters.getRelativeDiffParams( self.__comparator): delta = parameter.state[1] value = parameter.value if delta > 0: value -= delta blocks.append( formatters.packStatusDeltaBlockData( title=text_styles.middleTitle( MENU.tank_params(parameter.name)), valueStr=params_formatters.simlifiedDeltaParameter( parameter), statusBarData=SimplifiedBarVO( value=value, delta=delta, markerValue=self.__stockParams[parameter.name]), padding=self.__padding)) return blocks
def construct(self): block = [] if self.configuration.params: for parameter in params_formatters.getRelativeDiffParams( self.__comparator): delta = parameter.state[1] value = parameter.value if delta > 0: value -= delta block.append( formatters.packStatusDeltaBlockData( title=text_styles.middleTitle( MENU.tank_params(parameter.name)), valueStr=params_formatters.simlifiedDeltaParameter( parameter, self.__isSituational), statusBarData=SimplifiedBarVO( value=value, delta=delta, markerValue=self.__stockParams[parameter.name], isOptional=self.__isSituational), padding=formatters.packPadding(left=105, top=8))) return block
def _getSimplifiedValue(self, param): return formatters.simlifiedDeltaParameter(param)
def construct(self): block = [] if self.configuration.params: for parameter in params_formatters.getRelativeDiffParams(self.__comparator): delta = parameter.state[1] value = parameter.value if delta > 0: value -= delta block.append(formatters.packStatusDeltaBlockData(title=text_styles.middleTitle(MENU.tank_params(parameter.name)), valueStr=params_formatters.simlifiedDeltaParameter(parameter), statusBarData={'value': value, 'delta': delta, 'minValue': 0, 'markerValue': self.__stockParams[parameter.name], 'maxValue': MAX_RELATIVE_VALUE, 'useAnim': False}, padding=formatters.packPadding(left=105, top=8))) return block