OpenTTD Source 20241224-master-gf74b0cf984
CargoFilterCriteria Namespace Reference

Special cargo filter criteria. More...

Variables

static constexpr CargoID CF_ANY = NUM_CARGO
 Show all items independent of carried cargo (i.e. no filtering)
 
static constexpr CargoID CF_NONE = NUM_CARGO + 1
 Show only items which do not carry cargo (e.g. train engines)
 
static constexpr CargoID CF_ENGINES = NUM_CARGO + 2
 Show only engines (for rail vehicles only)
 
static constexpr CargoID CF_FREIGHT = NUM_CARGO + 3
 Show only vehicles which carry any freight (non-passenger) cargo.
 
static constexpr CargoID CF_NO_RATING = NUM_CARGO + 4
 Show items with no rating (station list)
 
static constexpr CargoID CF_SELECT_ALL = NUM_CARGO + 5
 Select all items (station list)
 
static constexpr CargoID CF_EXPAND_LIST = NUM_CARGO + 6
 Expand list to show all items (station list)
 

Detailed Description

Special cargo filter criteria.

These are used by user interface code only and must not be assigned to any entity. Not all values are valid for every UI filter.

Variable Documentation

◆ CF_ANY

◆ CF_ENGINES

constexpr CargoID CargoFilterCriteria::CF_ENGINES = NUM_CARGO + 2
staticconstexpr

Show only engines (for rail vehicles only)

Definition at line 96 of file cargo_type.h.

Referenced by CargoAndEngineFilter().

◆ CF_EXPAND_LIST

constexpr CargoID CargoFilterCriteria::CF_EXPAND_LIST = NUM_CARGO + 6
staticconstexpr

Expand list to show all items (station list)

Definition at line 101 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().

◆ CF_FREIGHT

constexpr CargoID CargoFilterCriteria::CF_FREIGHT = NUM_CARGO + 3
staticconstexpr

Show only vehicles which carry any freight (non-passenger) cargo.

Definition at line 97 of file cargo_type.h.

Referenced by BaseVehicleListWindow::BuildCargoDropDownList(), and CargoFilterSingle().

◆ CF_NO_RATING

constexpr CargoID CargoFilterCriteria::CF_NO_RATING = NUM_CARGO + 4
staticconstexpr

Show items with no rating (station list)

Definition at line 99 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().

◆ CF_NONE

◆ CF_SELECT_ALL

constexpr CargoID CargoFilterCriteria::CF_SELECT_ALL = NUM_CARGO + 5
staticconstexpr

Select all items (station list)

Definition at line 100 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().