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

Function ShowReplaceGroupVehicleWindow

src/autoreplace_gui.cpp:882–890  ·  view source on GitHub ↗

* Show the autoreplace configuration window for a particular group. * @param id_g The group to replace the vehicles for. * @param vehicletype The type of vehicles in the group. */

Source from the content-addressed store, hash-verified

880 * @param vehicletype The type of vehicles in the group.
881 */
882void ShowReplaceGroupVehicleWindow(GroupID id_g, VehicleType vehicletype)
883{
884 CloseWindowById(WC_REPLACE_VEHICLE, vehicletype);
885 switch (vehicletype) {
886 case VEH_TRAIN: new ReplaceVehicleWindow(_replace_rail_vehicle_desc, vehicletype, id_g); break;
887 case VEH_ROAD: new ReplaceVehicleWindow(_replace_road_vehicle_desc, vehicletype, id_g); break;
888 default: new ReplaceVehicleWindow(_replace_vehicle_desc, vehicletype, id_g); break;
889 }
890}

Callers 2

OnDropdownSelectMethod · 0.85
OnDropdownSelectMethod · 0.85

Calls 1

CloseWindowByIdFunction · 0.85

Tested by

no test coverage detected