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

Function ShowCompanyGroupInternal

src/group_gui.cpp:1224–1232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1222 */
1223template <bool Tneed_existing_window>
1224static void ShowCompanyGroupInternal(CompanyID company, VehicleType vehicle_type, GroupID group)
1225{
1226 if (!Company::IsValidID(company)) return;
1227
1228 assert(vehicle_type < std::size(_vehicle_group_desc));
1229 VehicleListIdentifier vli(VL_GROUP_LIST, vehicle_type, company);
1230 VehicleGroupWindow *w = AllocateWindowDescFront<VehicleGroupWindow, Tneed_existing_window>(_vehicle_group_desc[vehicle_type], vli.ToWindowNumber(), vli);
1231 if (w != nullptr) w->SelectGroup(group);
1232}
1233
1234/**
1235 * Show the group window for the given company and vehicle type.

Callers

nothing calls this directly

Calls 3

ToWindowNumberMethod · 0.80
SelectGroupMethod · 0.80
sizeFunction · 0.50

Tested by

no test coverage detected