src/build_vehicle_gui.cpp
changeset 8493 3ab458f7cff4
parent 8424 4a488a90ccab
child 8602 9e75e594a068
equal deleted inserted replaced
8492:d61f7a733d19 8493:3ab458f7cff4
   886 static void DrawBuildVehicleWindow(Window *w)
   886 static void DrawBuildVehicleWindow(Window *w)
   887 {
   887 {
   888 	const buildvehicle_d *bv = &WP(w, buildvehicle_d);
   888 	const buildvehicle_d *bv = &WP(w, buildvehicle_d);
   889 	uint max = min(w->vscroll.pos + w->vscroll.cap, EngList_Count(&bv->eng_list));
   889 	uint max = min(w->vscroll.pos + w->vscroll.cap, EngList_Count(&bv->eng_list));
   890 
   890 
   891 	SetWindowWidgetDisabledState(w, BUILD_VEHICLE_WIDGET_BUILD, w->window_number <= VEH_END);
   891 	w->SetWidgetDisabledState(BUILD_VEHICLE_WIDGET_BUILD, w->window_number <= VEH_END);
   892 
   892 
   893 	SetVScrollCount(w, EngList_Count(&bv->eng_list));
   893 	SetVScrollCount(w, EngList_Count(&bv->eng_list));
   894 	SetDParam(0, bv->filter.railtype + STR_881C_NEW_RAIL_VEHICLES); // This should only affect rail vehicles
   894 	SetDParam(0, bv->filter.railtype + STR_881C_NEW_RAIL_VEHICLES); // This should only affect rail vehicles
   895 	DrawWindowWidgets(w);
   895 	DrawWindowWidgets(w);
   896 
   896