@@ -270,26 +270,29 @@ static RefitList *BuildRefitList(const V
}
} while (v->type == VEH_TRAIN && (u = u->next) != NULL && num_lines < max_lines);
list->num_lines = num_lines;
list->items = refit;
return list;
/** Draw the list of available refit options for a consist.
* Draw the list and highlight the selected refit option (if any)
* @param *v first vehicle in consist to get the refit-options of
* @param *list first vehicle in consist to get the refit-options of
* @param sel selected refit cargo-type in the window
* @param pos position of the selected item in caller widow
* @param rows number of rows(capacity) in caller window
* @param delta step height in caller window
* @return the refit option that is hightlighted, NULL if none
*/
static RefitOption *DrawVehicleRefitWindow(const RefitList *list, int sel, uint pos, uint rows, uint delta)
{
RefitOption *refit = list->items;
RefitOption *selected = NULL;
uint num_lines = list->num_lines;
uint y = 31;
uint i;
/* Draw the list, and find the selected cargo (by its position in list) */
for (i = 0; i < num_lines; i++) {