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

Function FindVehicleGroupWindow

src/group_gui.cpp:1260–1263  ·  view source on GitHub ↗

* Finds a group list window determined by vehicle type and owner * @param vt vehicle type * @param owner owner of groups * @return pointer to VehicleGroupWindow, nullptr if not found */

Source from the content-addressed store, hash-verified

1258 * @return pointer to VehicleGroupWindow, nullptr if not found
1259 */
1260static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner owner)
1261{
1262 return dynamic_cast<VehicleGroupWindow *>(FindWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, owner).ToWindowNumber()));
1263}
1264
1265/**
1266 * Opens a 'Rename group' window for newly created group.

Callers 2

CcCreateGroupFunction · 0.85

Calls 4

FindWindowByIdFunction · 0.85
ToWindowNumberMethod · 0.80

Tested by

no test coverage detected