OpenTTD Source: src/group_gui.h File Reference

OpenTTD Source 12.0-beta1

Functions
group_gui.h File Reference
`#include "company_type.h"`
`#include "vehicle_type.h"`

Go to the source code of this file.

## Functions
void | ShowCompanyGroup (CompanyID company, VehicleType veh, GroupID group=INVALID_GROUP, bool need_existing_window=false)
| Show the group window for the given company and vehicle type. More...
void | ShowCompanyGroupForVehicle (const Vehicle *v)
| Show the group window for the given vehicle. More...
void | DeleteGroupHighlightOfVehicle (const Vehicle *v)
| Removes the highlight of a vehicle in a group window. More...

## Detailed Description

Functions/definitions that have something to do with groups.

Definition in file group_gui.h.

## Function Documentation

## ◆ DeleteGroupHighlightOfVehicle()

void DeleteGroupHighlightOfVehicle | ( | const Vehicle * | v | ) |

Removes the highlight of a vehicle in a group window.

Parameters

  *v | Vehicle to remove all highlights from

Definition at line 1169 of file group_gui.cpp.

References _special_mouse_mode, FindVehicleGroupWindow(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, Vehicle::owner, BaseVehicle::type, VehicleGroupWindow::UnselectVehicle(), and WSM_DRAGDROP.

## ◆ ShowCompanyGroup()

void ShowCompanyGroup | ( | CompanyID | company,
|  | VehicleType | vehicle_type,
|  | GroupID | group = `INVALID_GROUP`,
|  | bool | need_existing_window = `false`
| ) |  |

Show the group window for the given company and vehicle type.

Parameters

  company | The company to show the window for.
  vehicle_type | The type of vehicle to show it for.
  group | The group to be selected. Defaults to INVALID_GROUP.
  need_existing_window | Whether the existing window is needed. Defaults to false.

Definition at line 1096 of file group_gui.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID().

Referenced by ShowCompanyGroupForVehicle().

## ◆ ShowCompanyGroupForVehicle()

void ShowCompanyGroupForVehicle | ( | const Vehicle * | v | ) |

Show the group window for the given vehicle.

Parameters

  v | The vehicle to show the window for.

Definition at line 1115 of file group_gui.cpp.

References Vehicle::group_id, Vehicle::owner, ShowCompanyGroup(), and BaseVehicle::type.

Referenced by NewsWindow::OnClick(), and VehicleListWindow::OnClick().