depot_gui.c
changeset 5255 b693a9941b8c
parent 5125 d1331d6dbdcb
child 5256 9056fd4b30f4
equal deleted inserted replaced
5254:bce68eeaab3b 5255:b693a9941b8c
  1031 			w->widget[DEPOT_WIDGET_SELL_CHAIN].right = w->widget[DEPOT_WIDGET_SELL].right;
  1031 			w->widget[DEPOT_WIDGET_SELL_CHAIN].right = w->widget[DEPOT_WIDGET_SELL].right;
  1032 		}
  1032 		}
  1033 		ResizeDepotButtons(w);
  1033 		ResizeDepotButtons(w);
  1034 	}
  1034 	}
  1035 }
  1035 }
       
  1036 
       
  1037 /** Removes the highlight of a vehicle in a depot window
       
  1038  * @param *v Vehicle to remove all highlights from
       
  1039  */
       
  1040 void DeleteDepotHighlightOfVehicle(const Vehicle *v)
       
  1041 {
       
  1042 	Window* const *wz;
       
  1043 
       
  1044 	FOR_ALL_WINDOWS(wz) {
       
  1045 		const Window *w = *wz;
       
  1046 		if (w->window_class != WC_VEHICLE_DEPOT) continue;
       
  1047 		if (w->window_number != v->tile) continue;
       
  1048 		if (WP(w, depot_d).sel == v->index) {
       
  1049 			WP(w, depot_d).sel = INVALID_VEHICLE;
       
  1050 			ResetObjectToPlace();
       
  1051 		}
       
  1052 	}
       
  1053 }