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

Method GetCargoFilterLabel

src/vehicle_gui.cpp:483–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483StringID BaseVehicleListWindow::GetCargoFilterLabel(CargoType cargo_type) const
484{
485 switch (cargo_type) {
486 case CargoFilterCriteria::CF_ANY: return STR_CARGO_TYPE_FILTER_ALL;
487 case CargoFilterCriteria::CF_FREIGHT: return STR_CARGO_TYPE_FILTER_FREIGHT;
488 case CargoFilterCriteria::CF_NONE: return STR_CARGO_TYPE_FILTER_NONE;
489 default: return CargoSpec::Get(cargo_type)->name;
490 }
491}
492
493/**
494 * Build drop down list for cargo filter selection.

Callers 3

GetWidgetStringMethod · 0.45
GetWidgetStringMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected