src/vehicle_gui.cpp
branchnoai
changeset 11126 72d4c9314c72
parent 11044 097ea3e7ec56
equal deleted inserted replaced
11111:1b984dab8cec 11126:72d4c9314c72
   217 					refit[num_lines].engine  = INVALID_ENGINE;
   217 					refit[num_lines].engine  = INVALID_ENGINE;
   218 					num_lines++;
   218 					num_lines++;
   219 				}
   219 				}
   220 			}
   220 			}
   221 		}
   221 		}
   222 	} while (v->type == VEH_TRAIN && (u = u->Next()) != NULL && num_lines < max_lines);
   222 	} while ((v->type == VEH_TRAIN || v->type == VEH_ROAD) && (u = u->Next()) != NULL && num_lines < max_lines);
   223 
   223 
   224 	list->num_lines = num_lines;
   224 	list->num_lines = num_lines;
   225 	list->items = refit;
   225 	list->items = refit;
   226 
   226 
   227 	return list;
   227 	return list;
  1307 				 * height already allocated for the cargo of the first vehicle. */
  1307 				 * height already allocated for the cargo of the first vehicle. */
  1308 				uint height_extension = 15 - 11;
  1308 				uint height_extension = 15 - 11;
  1309 
  1309 
  1310 				/* Add space for the cargo amount for each part. */
  1310 				/* Add space for the cargo amount for each part. */
  1311 				for (const Vehicle *u = v; u != NULL; u = u->Next()) {
  1311 				for (const Vehicle *u = v; u != NULL; u = u->Next()) {
  1312 					height_extension += 11;
  1312 					if (u->cargo_cap != 0) height_extension += 11;
  1313 				}
  1313 				}
  1314 
  1314 
  1315 				ResizeWindow(this, 0, height_extension);
  1315 				ResizeWindow(this, 0, height_extension);
  1316 			} break;
  1316 			} break;
  1317 
  1317