* Draw the details info tab for the given vehicle at the given position * * @param v current vehicle * @param left The left most coordinate to draw * @param right The right most coordinate to draw * @param y The y coordinate */
| 231 | * @param y The y coordinate |
| 232 | */ |
| 233 | static void TrainDetailsInfoTab(const Vehicle *v, int left, int right, int y) |
| 234 | { |
| 235 | std::string str; |
| 236 | if (RailVehInfo(v->engine_type)->railveh_type == RAILVEH_WAGON) { |
| 237 | str = GetString(STR_VEHICLE_DETAILS_TRAIN_WAGON_VALUE, PackEngineNameDParam(v->engine_type, EngineNameContext::VehicleDetails), v->value); |
| 238 | } else { |
| 239 | str = GetString(STR_VEHICLE_DETAILS_TRAIN_ENGINE_BUILT_AND_VALUE, PackEngineNameDParam(v->engine_type, EngineNameContext::VehicleDetails), v->build_year, v->value); |
| 240 | } |
| 241 | DrawString(left, right, y, str); |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Draw the details capacity tab for the given vehicle at the given position |
no test coverage detected