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

Function DeleteGroupHighlightOfVehicle

src/group_gui.cpp:1307–1316  ·  view source on GitHub ↗

* Removes the highlight of a vehicle in a group window * @param *v Vehicle to remove all highlights from */

Source from the content-addressed store, hash-verified

1305 * @param *v Vehicle to remove all highlights from
1306 */
1307void DeleteGroupHighlightOfVehicle(const Vehicle *v)
1308{
1309 /* If we haven't got any vehicles on the mouse pointer, we haven't got any highlighted in any group windows either
1310 * If that is the case, we can skip looping though the windows and save time
1311 */
1312 if (_special_mouse_mode != WSM_DRAGDROP) return;
1313
1314 VehicleGroupWindow *w = FindVehicleGroupWindow(v->type, v->owner);
1315 if (w != nullptr) w->UnselectVehicle(v->index);
1316}

Callers 1

PreDestructorMethod · 0.85

Calls 2

FindVehicleGroupWindowFunction · 0.85
UnselectVehicleMethod · 0.80

Tested by

no test coverage detected