MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ShowVehicleRefitWindow

Function ShowVehicleRefitWindow

src/vehicle_gui.cpp:1350–1355  ·  view source on GitHub ↗

* Show the refit window for a vehicle * @param *v The vehicle to show the refit window for * @param order of the vehicle to assign refit to, or INVALID_VEH_ORDER_ID to refit the vehicle now * @param parent the parent window of the refit window * @param auto_refit Choose cargo for auto-refitting */

Source from the content-addressed store, hash-verified

1348 * @param auto_refit Choose cargo for auto-refitting
1349 */
1350void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit)
1351{
1352 CloseWindowById(WC_VEHICLE_REFIT, v->index);
1353 RefitWindow *w = new RefitWindow(_vehicle_refit_desc, v, order, auto_refit);
1354 w->parent = parent;
1355}
1356
1357/** Display list of cargo types of the engine, for the purchase information window */
1358uint ShowRefitOptionsList(int left, int right, int y, EngineID engine)

Callers 2

OrderClick_RefitMethod · 0.85
OnClickMethod · 0.85

Calls 1

CloseWindowByIdFunction · 0.85

Tested by

no test coverage detected