OpenTTD Source: src/vehicle_gui.cpp File Reference

OpenTTD Source 15.3

Data Structures | Typedefs | Enumerations | Functions | Variables
vehicle_gui.cpp File Reference

The base GUI for all vehicles. More...

`#include "stdafx.h"`
`#include "debug.h"`
`#include "company_func.h"`
`#include "gui.h"`
`#include "textbuf_gui.h"`
`#include "command_func.h"`
`#include "vehicle_gui_base.h"`
`#include "viewport_func.h"`
`#include "newgrf_text.h"`
`#include "newgrf_debug.h"`
`#include "roadveh.h"`
`#include "train.h"`
`#include "aircraft.h"`
`#include "depot_map.h"`
`#include "group_gui.h"`
`#include "strings_func.h"`
`#include "vehicle_func.h"`
`#include "autoreplace_gui.h"`
`#include "string_func.h"`
`#include "dropdown_type.h"`
`#include "dropdown_func.h"`
`#include "timetable.h"`
`#include "articulated_vehicles.h"`
`#include "core/geometry_func.hpp"`
`#include "core/container_func.hpp"`
`#include "company_base.h"`
`#include "engine_func.h"`
`#include "station_base.h"`
`#include "tilehighlight_func.h"`
`#include "zoom_func.h"`
`#include "depot_cmd.h"`
`#include "vehicle_cmd.h"`
`#include "order_cmd.h"`
`#include "roadveh_cmd.h"`
`#include "train_cmd.h"`
`#include "hotkeys.h"`
`#include "group_cmd.h"`
`#include "table/strings.h"`
`#include "safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | RefitOption
| Option to refit a vehicle chain. More...
struct | RefitWindow
| Refit cargo window. More...
struct | VehicleListWindow
| Window for the (old) vehicle listing. More...
struct | VehicleDetailsWindow
| Class for managing the vehicle details window. More...
struct | VehicleViewWindow
| Window manager class for viewing a vehicle. More...

## Typedefs
using | RefitOptions = std::map< CargoType, std::vector< RefitOption >, CargoTypeComparator >
| Available refit options (subtype and string) associated with each cargo type.

## Enumerations
enum | VehicleCommandTranslation : uint8_t { VCT_CMD_START_STOP = 0 , VCT_CMD_CLONE_VEH , VCT_CMD_TURN_AROUND }
| Command indices for the _vehicle_command_translation_table. More...

## Functions
template<BaseVehicleListWindow::VehicleIndividualSortFunction func>
static bool | VehicleIndividualToGroupSorterWrapper (GUIVehicleGroup const &a, GUIVehicleGroup const &b)
| Wrapper to convert a VehicleIndividualSortFunction to a VehicleGroupSortFunction.
uint | CountDigitsForAllocatingSpace (uint number)
| Get the number of digits of space required for the given number.
uint | GetUnitNumberDigits (VehicleList &vehicles)
| Get the number of digits the biggest unit number of a set of vehicles has.
static bool | CargoFilterSingle (const Vehicle *v, const CargoType cargo_type)
| Check whether a single vehicle should pass the filter.
static bool | CargoFilter (const GUIVehicleGroup *vehgroup, const CargoType cargo_type)
| Check whether a vehicle can carry a specific cargo.
bool | ShowCargoIconOverlay ()
| Test if cargo icon overlays should be drawn.
void | AddCargoIconOverlay (std::vector< CargoIconOverlay > &overlays, int x, int width, const Vehicle *v)
| Add a cargo icon to the list of overlays.
void | DrawCargoIconOverlay (int x, int y, CargoType cargo_type)
| Draw a cargo icon overlaying an existing sprite, with a black contrast outline.
void | DrawCargoIconOverlays (std::span< const CargoIconOverlay > overlays, int y)
| Draw a list of cargo icon overlays.
void | DepotSortList (VehicleList *list)
static void | DrawVehicleProfitButton (TimerGameEconomy::Date age, Money display_profit_last_year, uint num_vehicles, int x, int y)
| draw the vehicle profit button in the vehicle list window.
uint8_t | GetBestFittingSubType (Vehicle *v_from, Vehicle *v_for, CargoType dest_cargo_type)
| Get the best fitting subtype when 'cloning'/'replacing' v_from with v_for.
static void | DrawVehicleRefitWindow (const RefitOptions &refits, const RefitOption *sel, uint pos, uint rows, uint delta, const Rect &r)
| Draw the list of available refit options for a consist and highlight the selected refit option (if any).
void | ShowVehicleRefitWindow (const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit)
| Show the refit window for a vehicle.
uint | ShowRefitOptionsList (int left, int right, int y, EngineID engine)
| Display list of cargo types of the engine, for the purchase information window.
StringID | GetCargoSubtypeText (const Vehicle *v)
| Get the cargo subtype text from NewGRF for the vehicle details window.
static bool | VehicleGroupLengthSorter (const GUIVehicleGroup &a, const GUIVehicleGroup &b)
| Sort vehicle groups by the number of vehicles in the group.
static bool | VehicleGroupTotalProfitThisYearSorter (const GUIVehicleGroup &a, const GUIVehicleGroup &b)
| Sort vehicle groups by the total profit this year.
static bool | VehicleGroupTotalProfitLastYearSorter (const GUIVehicleGroup &a, const GUIVehicleGroup &b)
| Sort vehicle groups by the total profit last year.
static bool | VehicleGroupAverageProfitThisYearSorter (const GUIVehicleGroup &a, const GUIVehicleGroup &b)
| Sort vehicle groups by the average profit this year.
static bool | VehicleGroupAverageProfitLastYearSorter (const GUIVehicleGroup &a, const GUIVehicleGroup &b)
| Sort vehicle groups by the average profit last year.
static bool | VehicleNumberSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their number.
static bool | VehicleNameSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their name.
static bool | VehicleAgeSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their age.
static bool | VehicleProfitThisYearSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by this year profit.
static bool | VehicleProfitLastYearSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by last year profit.
static bool | VehicleCargoSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their cargo.
static bool | VehicleReliabilitySorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their reliability.
static bool | VehicleMaxSpeedSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their max speed.
static bool | VehicleModelSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by model.
static bool | VehicleValueSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their value.
static bool | VehicleLengthSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by their length.
static bool | VehicleTimeToLiveSorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by the time they can still live.
static bool | VehicleTimetableDelaySorter (const Vehicle *const &a, const Vehicle *const &b)
| Sort vehicles by the timetable delay.
void | InitializeGUI ()
static void | ChangeVehicleWindow (WindowClass window_class, VehicleID from_index, VehicleID to_index)
| Assign a vehicle window a new vehicle.
void | ChangeVehicleViewWindow (VehicleID from_index, VehicleID to_index)
| Report a change in vehicle IDs (due to autoreplace) to affected vehicle windows.
static void | DrawSmallOrderList (const Vehicle *v, int left, int right, int y, uint order_arrow_width, VehicleOrderID start)
static void | DrawSmallOrderList (const OrderList *orderlist, int left, int right, int y, uint order_arrow_width)
| Draw small order list in the vehicle GUI, but without the little black arrow.
void | DrawVehicleImage (const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip)
| Draws an image of a vehicle chain.
uint | GetVehicleListHeight (VehicleType type, uint divisor)
| Get the height of a vehicle in the vehicle list GUIs.
static int | GetUnitNumberWidth (int digits)
| Get width required for the formatted unit number display.
static void | ShowVehicleListWindowLocal (CompanyID company, VehicleListType vlt, VehicleType vehicle_type, uint32_t unique_number)
void | ShowVehicleListWindow (CompanyID company, VehicleType vehicle_type)
void | ShowVehicleListWindow (const Vehicle *v)
void | ShowVehicleListWindow (CompanyID company, VehicleType vehicle_type, StationID station)
void | ShowVehicleListWindow (CompanyID company, VehicleType vehicle_type, TileIndex depot_tile)
int | GetTrainDetailsWndVScroll (VehicleID veh_id, TrainDetailsWindowTabs det_tab)
| Determines the number of lines in the train details window.
void | DrawTrainDetails (const Train *v, const Rect &r, int vscroll_pos, uint16_t vscroll_cap, TrainDetailsWindowTabs det_tab)
| Draw the details for the given vehicle at the given position.
void | DrawRoadVehDetails (const Vehicle *v, const Rect &r)
| Draw the details for the given vehicle at the given position.
void | DrawShipDetails (const Vehicle *v, const Rect &r)
| Draw the details for the given vehicle at the given position.
void | DrawAircraftDetails (const Aircraft *v, const Rect &r)
| Draw the details for the given vehicle at the given position.
static void | ShowVehicleDetailsWindow (const Vehicle *v)
| Shows the vehicle details window of the given vehicle.
void | CcStartStopVehicle (Commands, const CommandCost &result, VehicleID veh_id, bool)
| This is the Callback method after attempting to start/stop a vehicle.
void | StartStopVehicle (const Vehicle *v, bool texteffect)
| Executes CMD_START_STOP_VEHICLE for given vehicle.
static bool | IsVehicleRefittable (const Vehicle *v)
| Checks whether the vehicle may be refitted at the moment.
void | ShowVehicleViewWindow (const Vehicle *v)
| Shows the vehicle view window of the given vehicle.
bool | VehicleClicked (const Vehicle *v)
| Dispatch a "vehicle selected" event if any window waits for it.
bool | VehicleClicked (VehicleList::const_iterator begin, VehicleList::const_iterator end)
| Dispatch a "vehicle group selected" event if any window waits for it.
bool | VehicleClicked (const GUIVehicleGroup &vehgroup)
| Dispatch a "vehicle group selected" event if any window waits for it.
void | StopGlobalFollowVehicle (const Vehicle *v)
void | CcBuildPrimaryVehicle (Commands, const CommandCost &result, VehicleID new_veh_id, uint, uint16_t, CargoArray)
| This is the Callback method after the construction attempt of a primary vehicle.
int | GetSingleVehicleWidth (const Vehicle *v, EngineImageType image_type)
| Get the width of a vehicle (part) in pixels.
int | GetVehicleWidth (const Vehicle *v, EngineImageType image_type)
| Get the width of a vehicle (including all parts of the consist) in pixels.
void | SetMouseCursorVehicle (const Vehicle *v, EngineImageType image_type)
| Set the mouse cursor to look like a vehicle.

## Variables
static std::array< std::array< BaseVehicleListWindow::GroupBy, VEH_COMPANY_END >, VLT_END > | _grouping {}
static std::array< Sorting, BaseVehicleListWindow::GB_END > | _sorting {}
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleNumberSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleNameSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleAgeSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleProfitThisYearSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleProfitLastYearSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleCargoSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleReliabilitySorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleMaxSpeedSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleModelSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleValueSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleLengthSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleTimeToLiveSorter
static BaseVehicleListWindow::VehicleIndividualSortFunction | VehicleTimetableDelaySorter
static BaseVehicleListWindow::VehicleGroupSortFunction | VehicleGroupLengthSorter
static BaseVehicleListWindow::VehicleGroupSortFunction | VehicleGroupTotalProfitThisYearSorter
static BaseVehicleListWindow::VehicleGroupSortFunction | VehicleGroupTotalProfitLastYearSorter
static BaseVehicleListWindow::VehicleGroupSortFunction | VehicleGroupAverageProfitThisYearSorter
static BaseVehicleListWindow::VehicleGroupSortFunction | VehicleGroupAverageProfitLastYearSorter
static GUIVehicleGroupList::FilterFunction *const | _vehicle_group_filter_funcs []
static const Vehicle * | _last_vehicle [2] = { nullptr, nullptr }
static const uint | MAX_REFIT_CYCLE = 256
| Maximum number of refit cycles we try, to prevent infinite loops.
static constexpr std::initializer_list< NWidgetPart > | _nested_vehicle_refit_widgets
static WindowDesc | _vehicle_refit_desc (WDP_AUTO, "view_vehicle_refit", 240, 174, WC_VEHICLE_REFIT, WC_VEHICLE_VIEW, WindowDefaultFlag::Construction, _nested_vehicle_refit_widgets)
static constexpr std::initializer_list< NWidgetPart > | _nested_vehicle_list
static WindowDesc | _vehicle_list_desc []
static constexpr std::initializer_list< NWidgetPart > | _nested_nontrain_vehicle_details_widgets
| Vehicle details widgets (other than train).
static constexpr std::initializer_list< NWidgetPart > | _nested_train_vehicle_details_widgets
| Train details widgets.
static const StringID | _service_interval_dropdown_calendar []
static const StringID | _service_interval_dropdown_wallclock []
static WindowDesc | _train_vehicle_details_desc (WDP_AUTO, "view_vehicle_details_train", 405, 178, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, {}, _nested_train_vehicle_details_widgets)
| Vehicle details window descriptor.
static WindowDesc | _nontrain_vehicle_details_desc (WDP_AUTO, "view_vehicle_details", 405, 113, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, {}, _nested_nontrain_vehicle_details_widgets)
| Vehicle details window descriptor for other vehicles than a train.
static constexpr std::initializer_list< NWidgetPart > | _nested_vehicle_view_widgets
| Vehicle view widgets.
static const ZoomLevel | _vehicle_view_zoom_levels []
| Zoom levels for vehicle views indexed by vehicle type.
static const int | VV_INITIAL_VIEWPORT_WIDTH = 226
static const int | VV_INITIAL_VIEWPORT_HEIGHT = 84
static const int | VV_INITIAL_VIEWPORT_HEIGHT_TRAIN = 102
static const StringID | _vehicle_msg_translation_table [][4]
| Command codes for the shared buttons indexed by VehicleCommandTranslation and vehicle type.
static WindowDesc | _vehicle_view_desc (WDP_AUTO, "view_vehicle", 250, 116, WC_VEHICLE_VIEW, WC_NONE, {}, _nested_vehicle_view_widgets, &VehicleViewWindow::hotkeys)
| Vehicle view window descriptor for all vehicles but trains.
static WindowDesc | _train_view_desc (WDP_AUTO, "view_vehicle_train", 250, 134, WC_VEHICLE_VIEW, WC_NONE, {}, _nested_vehicle_view_widgets, &VehicleViewWindow::hotkeys)
| Vehicle view window descriptor for trains.

## Detailed Description

The base GUI for all vehicles.

Definition in file vehicle_gui.cpp.

## Typedef Documentation

## ◆ RefitOptions

using RefitOptions = std::map<CargoType, std::vector<RefitOption>, CargoTypeComparator>

Available refit options (subtype and string) associated with each cargo type.

Definition at line 680 of file vehicle_gui.cpp.

## Enumeration Type Documentation

## ◆ VehicleCommandTranslation

enum VehicleCommandTranslation : uint8_t

Command indices for the _vehicle_command_translation_table.

Definition at line 2888 of file vehicle_gui.cpp.

## Function Documentation

## ◆ AddCargoIconOverlay()

void AddCargoIconOverlay | ( | std::vector< CargoIconOverlay > & | overlays,
|  | int | x,
|  | int | width,
|  | const Vehicle * | v
| ) |  |

Add a cargo icon to the list of overlays.

Parameters

  overlays | List of overlays.
  x | Horizontal position.
  width | Width available.
  v | Vehicle to add.

Definition at line 349 of file vehicle_gui.cpp.

References _current_text_dir, Vehicle::cargo_cap, Vehicle::cargo_type, Vehicle::IsArticulatedPart(), Vehicle::Previous(), and TD_RTL.

Referenced by DrawRoadVehImage(), and DrawTrainImage().

## ◆ CargoFilter()

static bool CargoFilter | ( | const GUIVehicleGroup * | vehgroup,
|  | const CargoType | cargo_type
| ) |  |
| static

Check whether a vehicle can carry a specific cargo.

Parameters

  vehgroup | The vehicle group which contains the vehicle to be checked
  cargo_type | The cargo what we are looking for

Returns
  Whether the vehicle can carry the specified cargo or not

Definition at line 321 of file vehicle_gui.cpp.

References CargoFilterSingle(), GUIVehicleGroup::vehicles_begin, and GUIVehicleGroup::vehicles_end.

## ◆ CargoFilterSingle()

static bool CargoFilterSingle | ( | const Vehicle * | v,
|  | const CargoType | cargo_type
| ) |  |
| static

Check whether a single vehicle should pass the filter.

Parameters

  v | The vehicle to check.
  cargo_type | The cargo to filter for.

Returns
  true iff the vehicle carries the cargo.

Definition at line 281 of file vehicle_gui.cpp.

References CargoFilterCriteria::CF_ANY, CargoFilterCriteria::CF_FREIGHT, CargoFilterCriteria::CF_NONE, IsCargoInClass(), Vehicle::Next(), and Passengers.

Referenced by CargoFilter().

## ◆ CcBuildPrimaryVehicle()

void CcBuildPrimaryVehicle | ( | Commands | cmd,
|  | const CommandCost & | result,
|  | VehicleID | new_veh_id,
|  | uint | ,
|  | uint16_t | ,
|  | CargoArray |
| ) |  |

This is the Callback method after the construction attempt of a primary vehicle.

Parameters

  result | indicates completion (or not) of the operation
  new_veh_id | ID of the new vehicle.

Definition at line 3495 of file vehicle_gui.cpp.

References CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::Get(), and ShowVehicleViewWindow().

## ◆ CcStartStopVehicle()

void CcStartStopVehicle | ( | Commands | cmd,
|  | const CommandCost & | result,
|  | VehicleID | veh_id,
|  | bool |
| ) |  |

This is the Callback method after attempting to start/stop a vehicle.

Parameters

  result | the result of the start/stop command
  veh_id | Vehicle ID.

Definition at line 2921 of file vehicle_gui.cpp.

References _local_company, Ticks::DAY_TICKS, CommandCost::Failed(), GetEncodedString(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::GetIfValid(), Vehicle::IsPrimaryVehicle(), Vehicle::owner, RemapCoords(), Stopped, TE_RISING, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), Vehicle::vehstatus, Coord2D< T >::x, Vehicle::x_pos, Coord2D< T >::y, Vehicle::y_pos, and Vehicle::z_pos.

Referenced by StartStopVehicle().

## ◆ ChangeVehicleViewWindow()

void ChangeVehicleViewWindow | ( | VehicleID | from_index,
|  | VehicleID | to_index
| ) |  |

Report a change in vehicle IDs (due to autoreplace) to affected vehicle windows.

Parameters

  from_index | the old vehicle ID
  to_index | the new vehicle ID

Definition at line 1589 of file vehicle_gui.cpp.

References ChangeVehicleWindow(), WC_VEHICLE_DETAILS, WC_VEHICLE_ORDERS, WC_VEHICLE_REFIT, WC_VEHICLE_TIMETABLE, and WC_VEHICLE_VIEW.

Referenced by CopyHeadSpecificThings().

## ◆ ChangeVehicleWindow()

static void ChangeVehicleWindow | ( | WindowClass | window_class,
|  | VehicleID | from_index,
|  | VehicleID | to_index
| ) |  |
| inlinestatic

Assign a vehicle window a new vehicle.

Parameters

  window_class | WindowClass to search for
  from_index | the old vehicle ID
  to_index | the new vehicle ID

Definition at line 1566 of file vehicle_gui.cpp.

References FindWindowById(), Window::InvalidateData(), Window::viewport, VIWD_AUTOREPLACE, TileHighlightData::window_class, TileHighlightData::window_number, and Window::window_number.

Referenced by ChangeVehicleViewWindow().

## ◆ CountDigitsForAllocatingSpace()

uint CountDigitsForAllocatingSpace | ( | uint | number | ) |

Get the number of digits of space required for the given number.

Parameters

  number | The number.

Returns
  The number of digits to allocate space for.

Definition at line 190 of file vehicle_gui.cpp.

Referenced by GetUnitNumberDigits().

## ◆ DepotSortList()

void DepotSortList | ( | VehicleList * | list | ) |

Definition at line 564 of file vehicle_gui.cpp.

## ◆ DrawAircraftDetails()

void DrawAircraftDetails | ( | const Aircraft * | v,
|  | const Rect & | r
| ) |  |
| extern

Draw the details for the given vehicle at the given position.

Parameters

  v | current vehicle
  r | the Rect to draw within

Definition at line 29 of file aircraft_gui.cpp.

References DrawString(), FS_NORMAL, GetCargoSubtypeText(), GetCharacterHeight(), GetString(), SpecializedVehicle< T, Type >::Next(), PackEngineNameDParam(), WidgetDimensions::scaled, VehicleDetails, and WidgetDimensions::vsep_normal.

Referenced by VehicleDetailsWindow::DrawVehicleDetails().

## ◆ DrawCargoIconOverlay()

void DrawCargoIconOverlay | ( | int | x,
|  | int | y,
|  | CargoType | cargo_type
| ) |  |

Draw a cargo icon overlaying an existing sprite, with a black contrast outline.

Parameters

  x | Horizontal position from left.
  y | Vertical position from top.
  cargo_type | Cargo type to draw icon for.

Definition at line 372 of file vehicle_gui.cpp.

References DrawSprite(), CargoSpec::Get(), CargoSpec::GetCargoIcon(), GetSpriteSize(), IsValidCargoType(), PALETTE_ALL_BLACK, ScaleGUITrad(), and ShowCargoIconOverlay().

Referenced by DrawAircraftImage(), DrawCargoIconOverlays(), and DrawShipImage().

## ◆ DrawCargoIconOverlays()

void DrawCargoIconOverlays | ( | std::span< const CargoIconOverlay > | overlays,
|  | int | y
| ) |  |

Draw a list of cargo icon overlays.

Parameters

  overlays | List of overlays.
  y | Vertical position.

Definition at line 401 of file vehicle_gui.cpp.

References DrawCargoIconOverlay().

Referenced by DrawRoadVehImage(), and DrawTrainImage().

## ◆ DrawRoadVehDetails()

void DrawRoadVehDetails | ( | const Vehicle * | v,
|  | const Rect & | r
| ) |  |
| extern

Draw the details for the given vehicle at the given position.

Parameters

  v | current vehicle
  r | the Rect to draw within

Definition at line 29 of file roadveh_gui.cpp.

References _sorted_cargo_specs, AppendStringInPlace(), Vehicle::build_year, Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, DrawString(), Vehicle::engine_type, FS_NORMAL, GetCargoSubtypeText(), GetCharacterHeight(), VehicleCargoList::GetFeederShare(), VehicleCargoList::GetFirstStation(), GetListSeparator(), GetString(), Vehicle::HasArticulatedPart(), MakeParameters(), Vehicle::Next(), PackEngineNameDParam(), WidgetDimensions::scaled, ScaleSpriteTrad(), VehicleCargoList::StoredCount(), Vehicle::value, VehicleDetails, and WidgetDimensions::vsep_normal.

Referenced by VehicleDetailsWindow::DrawVehicleDetails().

## ◆ DrawShipDetails()

void DrawShipDetails | ( | const Vehicle * | v,
|  | const Rect & | r
| ) |  |
| extern

Draw the details for the given vehicle at the given position.

Parameters

  v | current vehicle
  r | the Rect to draw within

Definition at line 62 of file ship_gui.cpp.

References Vehicle::build_year, Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, DrawString(), Vehicle::engine_type, FS_NORMAL, GetCargoSubtypeText(), GetCharacterHeight(), VehicleCargoList::GetFeederShare(), VehicleCargoList::GetFirstStation(), GetString(), PackEngineNameDParam(), WidgetDimensions::scaled, VehicleCargoList::StoredCount(), Vehicle::value, VehicleDetails, and WidgetDimensions::vsep_normal.

Referenced by VehicleDetailsWindow::DrawVehicleDetails().

## ◆ DrawSmallOrderList() [1/2]

static void DrawSmallOrderList | ( | const OrderList * | orderlist,
|  | int | left,
|  | int | right,
|  | int | y,
|  | uint | order_arrow_width
| ) |  |
| static

Draw small order list in the vehicle GUI, but without the little black arrow.

This is used for shared order groups.

Definition at line 1684 of file vehicle_gui.cpp.

References _current_text_dir, DrawString(), FS_SMALL, GetCharacterHeight(), GetString(), SA_LEFT, and TD_RTL.

## ◆ DrawSmallOrderList() [2/2]

static void DrawSmallOrderList | ( | const Vehicle * | v,
|  | int | left,
|  | int | right,
|  | int | y,
|  | uint | order_arrow_width,
|  | VehicleOrderID | start
| ) |  |
| static

Definition at line 1658 of file vehicle_gui.cpp.

## ◆ DrawTrainDetails()

void DrawTrainDetails | ( | const Train * | v,
|  | const Rect & | r,
|  | int | vscroll_pos,
|  | uint16_t | vscroll_cap,
|  | TrainDetailsWindowTabs | det_tab
| ) |  |
| extern

Draw the details for the given vehicle at the given position.

Parameters

  v | current vehicle
  r | the Rect to draw within
  vscroll_pos | Position of scrollbar
  vscroll_cap | Number of lines currently displayed
  det_tab | Selected details tab

Definition at line 354 of file train_gui.cpp.

References _cargo_summary, _current_text_dir, _settings_game, _sorted_cargo_specs, Crashed, DIR_E, DIR_W, VehicleSpriteSeq::Draw(), DrawString(), EIT_IN_DETAILS, Vehicle::engine_type, VehicleSettings::freight_trains, FreightWagonMult(), FS_NORMAL, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_engine_pool >::Get(), GetCargoSummaryOfArticulatedVehicle(), GetCharacterHeight(), GetColourGradient(), Train::GetDisplayImageWidth(), Engine::GetGRF(), Train::GetImage(), SpecializedVehicle< T, Type >::GetNextVehicle(), GetString(), GetVehiclePalette(), GfxFillRect(), Rect::Height(), WidgetDimensions::hsep_normal, Rect::Indent(), Vehicle::IsArticulatedPart(), WidgetDimensions::matrix, SpecializedVehicle< T, Type >::Next(), PALETTE_CRASH, WidgetDimensions::scaled, ScaleSpriteTrad(), TD_RTL, TDW_TAB_CAPACITY, TDW_TAB_CARGO, TDW_TAB_INFO, TDW_TAB_TOTALS, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TRAIN_DETAILS_MAX_INDENT, TRAIN_DETAILS_MIN_INDENT, TrainDetailsCapacityTab(), TrainDetailsCargoTab(), TrainDetailsInfoTab(), GRFFile::traininfo_vehicle_pitch, GameSettings::vehicle, Vehicle::vehstatus, Rect::WithY(), and Coord2D< T >::x.

Referenced by VehicleDetailsWindow::DrawVehicleDetails().

## ◆ DrawVehicleImage()

void DrawVehicleImage | ( | const Vehicle * | v,
|  | const Rect & | r,
|  | VehicleID | selection,
|  | EngineImageType | image_type,
|  | int | skip
| ) |  |

Draws an image of a vehicle chain.

Parameters

  v | Front vehicle
  r | Rect to draw at
  selection | Selected vehicle to draw a frame around
  skip | Number of pixels to skip at the front (for scrolling)

Definition at line 1710 of file vehicle_gui.cpp.

References DrawAircraftImage(), DrawRoadVehImage(), DrawShipImage(), DrawTrainImage(), SpecializedVehicle< T, Type >::From(), BaseVehicle::type, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.

Referenced by NewGRFInspectWindow::DrawVehicleChainWidget(), BaseVehicleListWindow::DrawVehicleListItems(), RefitWindow::DrawWidget(), and VehicleDetailsWindow::DrawWidget().

## ◆ DrawVehicleProfitButton()

static void DrawVehicleProfitButton | ( | TimerGameEconomy::Date | age,
|  | Money | display_profit_last_year,
|  | uint | num_vehicles,
|  | int | x,
|  | int | y
| ) |  |
| static

draw the vehicle profit button in the vehicle list window.

Definition at line 571 of file vehicle_gui.cpp.

References DrawSprite(), VEHICLE_PROFIT_MIN_AGE, and VEHICLE_PROFIT_THRESHOLD.

Referenced by BaseVehicleListWindow::DrawVehicleListItems().

## ◆ DrawVehicleRefitWindow()

static void DrawVehicleRefitWindow | ( | const RefitOptions & | refits,
|  | const RefitOption * | sel,
|  | uint | pos,
|  | uint | rows,
|  | uint | delta,
|  | const Rect & | r
| ) |  |
| static

Draw the list of available refit options for a consist and highlight the selected refit option (if any).

Parameters

  refits | Available refit options for each (sorted) cargo.
  sel | Selected refit option in the window
  pos | Position of the selected item in caller widow
  rows | Number of rows(capacity) in caller window
  delta | Step height in caller window
  r | Rectangle of the matrix widget.

Definition at line 691 of file vehicle_gui.cpp.

References _current_text_dir, RefitOption::cargo, DrawSprite(), DrawString(), FS_NORMAL, CargoSpec::Get(), GetCharacterHeight(), GetColourGradient(), GetSpriteSize(), GetString(), Rect::Indent(), WidgetDimensions::matrix, CargoSpec::name, WidgetDimensions::scaled, Rect::Shrink(), RefitOption::subtype, and TD_RTL.

Referenced by RefitWindow::DrawWidget().

## ◆ GetBestFittingSubType()

uint8_t GetBestFittingSubType | ( | Vehicle * | v_from,
|  | Vehicle * | v_for,
|  | CargoType | dest_cargo_type
| ) |  |

Get the best fitting subtype when 'cloning'/'replacing' v_from with v_for.

All articulated parts of both vehicles are tested to find a possibly shared subtype. For v_for only vehicle refittable to dest_cargo_type are considered.

Parameters

  v_from | the vehicle to match the subtype from
  v_for | the vehicle to get the subtype for
  dest_cargo_type | Destination cargo type.

Returns
  the best sub type

Definition at line 600 of file vehicle_gui.cpp.

References EngineInfo::callback_mask, Engine::CanCarryCargo(), CargoSuffix, GetCargoSubtypeText(), Vehicle::GetEngine(), Vehicle::GetFirstEnginePart(), Vehicle::GetNextArticulatedPart(), Vehicle::HasArticulatedPart(), HasBit(), include(), MAX_REFIT_CYCLE, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().

Referenced by BuildReplacementVehicle(), CmdCloneVehicle(), LinkRefresher::HandleRefit(), and RefitVehicle().

## ◆ GetCargoSubtypeText()

StringID GetCargoSubtypeText | ( | const Vehicle * | v | ) |

Get the cargo subtype text from NewGRF for the vehicle details window.

Definition at line 1387 of file vehicle_gui.cpp.

References CALLBACK_FAILED, EngineInfo::callback_mask, CargoSuffix, CBID_VEHICLE_CARGO_SUFFIX, Vehicle::engine_type, ErrorUnknownCallbackResult(), Vehicle::GetGRF(), Vehicle::GetGRFID(), GetGRFStringID(), GetVehicleCallback(), GRFSTR_MISC_GRF_TEXT, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().

Referenced by RefitWindow::BuildRefitList(), DrawAircraftDetails(), DrawRoadVehDetails(), DrawShipDetails(), GetBestFittingSubType(), and GetCargoSummaryOfArticulatedVehicle().

## ◆ GetSingleVehicleWidth()

int GetSingleVehicleWidth | ( | const Vehicle * | v,
|  | EngineImageType | image_type
| ) |  |

Get the width of a vehicle (part) in pixels.

Parameters

  v | Vehicle to get the width for.

Returns
  Width of the vehicle.

Definition at line 3508 of file vehicle_gui.cpp.

References _current_text_dir, DIR_E, DIR_W, SpecializedVehicle< T, Type >::From(), VehicleSpriteSeq::GetBounds(), Vehicle::GetImage(), TD_RTL, BaseVehicle::type, UnScaleGUI(), VEH_ROAD, VEH_TRAIN, and Rect::Width().

Referenced by VehicleDetailsWindow::DrawWidget(), GetVehicleWidth(), and SetMouseCursorVehicle().

## ◆ GetTrainDetailsWndVScroll()

int GetTrainDetailsWndVScroll | ( | VehicleID | veh_id,
|  | TrainDetailsWindowTabs | det_tab
| ) |  |
| extern

Determines the number of lines in the train details window.

Parameters

  veh_id | Train
  det_tab | Selected details tab

Returns
  Number of line

Definition at line 320 of file train_gui.cpp.

References _cargo_summary, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::Get(), SpecializedVehicle< T, Type >::Get(), GetCargoSummaryOfArticulatedVehicle(), CargoArray::GetCount(), GetLengthOfArticulatedVehicle(), SpecializedVehicle< T, Type >::GetNextVehicle(), Vehicle::Next(), ScaleSpriteTrad(), TDW_TAB_TOTALS, and TRAIN_DETAILS_MAX_INDENT.

Referenced by VehicleDetailsWindow::OnPaint().

## ◆ GetUnitNumberDigits()

uint GetUnitNumberDigits | ( | VehicleList & | vehicles | ) |

Get the number of digits the biggest unit number of a set of vehicles has.

Parameters

  vehicles | The list of vehicles.

Returns
  The number of digits to allocate space for.

Definition at line 209 of file vehicle_gui.cpp.

References CountDigitsForAllocatingSpace().

Referenced by DepotWindow::OnPaint().

## ◆ GetUnitNumberWidth()

static int GetUnitNumberWidth | ( | int | digits | ) |
| static

Get width required for the formatted unit number display.

Parameters

  digits | Number of digits required for unit number.

Returns
  Required width in pixels.

Definition at line 1746 of file vehicle_gui.cpp.

References GetParamMaxDigits(), GetString(), and GetStringBoundingBox().

Referenced by BaseVehicleListWindow::DrawVehicleListItems().

## ◆ GetVehicleListHeight()

uint GetVehicleListHeight | ( | VehicleType | type,
|  | uint | divisor
| ) |  |

Get the height of a vehicle in the vehicle list GUIs.

Parameters

  type | the vehicle type to look at
  divisor | the resulting height must be dividable by this

Returns
  the height

Definition at line 1727 of file vehicle_gui.cpp.

References FS_SMALL, GetCharacterHeight(), GetVehicleHeight(), WidgetDimensions::matrix, WidgetDimensions::scaled, ScaleGUITrad(), VEH_SHIP, and RectPadding::Vertical().

Referenced by VehicleGroupWindow::UpdateWidgetSize(), and VehicleListWindow::UpdateWidgetSize().

## ◆ GetVehicleWidth()

int GetVehicleWidth | ( | const Vehicle * | v,
|  | EngineImageType | image_type
| ) |  |

Get the width of a vehicle (including all parts of the consist) in pixels.

Parameters

  v | Vehicle to get the width for.

Returns
  Width of the vehicle.

Definition at line 3532 of file vehicle_gui.cpp.

References GetSingleVehicleWidth(), SpecializedVehicle< T, Type >::Next(), BaseVehicle::type, VEH_ROAD, and VEH_TRAIN.

Referenced by RefitWindow::OnInvalidateData(), and RefitWindow::OnResize().

## ◆ InitializeGUI()

void InitializeGUI | ( |  | ) |

Definition at line 1554 of file vehicle_gui.cpp.

## ◆ IsVehicleRefittable()

static bool IsVehicleRefittable | ( | const Vehicle * | v | ) |
| static

Checks whether the vehicle may be refitted at the moment.

Definition at line 2945 of file vehicle_gui.cpp.

References Vehicle::engine_type, IsEngineRefittable(), Vehicle::IsGroundVehicle(), Vehicle::IsStoppedInDepot(), and Vehicle::Next().

Referenced by VehicleViewWindow::OnPaint().

## ◆ SetMouseCursorVehicle()

void SetMouseCursorVehicle | ( | const Vehicle * | v,
|  | EngineImageType | image_type
| ) |  |

Set the mouse cursor to look like a vehicle.

Parameters

  v | Vehicle
  image_type | Type of vehicle image to use.

Definition at line 3550 of file vehicle_gui.cpp.

References _current_text_dir, AIR_HELICOPTER, Crashed, DIR_E, DIR_W, SpecializedVehicle< T, Type >::From(), SpecializedVehicle< Aircraft, VEH_AIRCRAFT >::From(), Vehicle::GetImage(), Vehicle::GetNextArticulatedPart(), GetSingleVehicleWidth(), GetVehiclePalette(), Vehicle::HasArticulatedPart(), Vehicle::IsGroundVehicle(), VehicleSpriteSeq::IsValid(), PALETTE_CRASH, ScaleSpriteTrad(), VehicleSpriteSeq::Set(), CursorVars::sprites, Vehicle::subtype, TD_RTL, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), BaseVehicle::type, UpdateCursorSize(), VEH_AIRCRAFT, VEH_TRAIN, and Vehicle::vehstatus.

Referenced by DepotWindow::DepotClick(), and VehicleGroupWindow::OnClick().

## ◆ ShowCargoIconOverlay()

bool ShowCargoIconOverlay | ( |  | ) |

Test if cargo icon overlays should be drawn.

Returns
  true iff cargo icon overlays should be drawn.

Definition at line 337 of file vehicle_gui.cpp.

References _ctrl_pressed, and _shift_pressed.

Referenced by DrawCargoIconOverlay(), DrawRoadVehImage(), DrawTrainImage(), DepotWindow::OnMouseLoop(), VehicleGroupWindow::OnMouseLoop(), and VehicleListWindow::OnMouseLoop().

## ◆ ShowRefitOptionsList()

uint ShowRefitOptionsList | ( | int | left,
|  | int | right,
|  | int | y,
|  | EngineID | engine
| ) |  |

Display list of cargo types of the engine, for the purchase information window.

Definition at line 1358 of file vehicle_gui.cpp.

References _cargo_mask, CountBits(), DrawStringMultiLine(), GetString(), GetUnionOfArticulatedRefitMasks(), and HasAtMostOneBit().

Referenced by DrawVehiclePurchaseInfo().

## ◆ ShowVehicleDetailsWindow()

static void ShowVehicleDetailsWindow | ( | const Vehicle * | v | ) |
| static

Shows the vehicle details window of the given vehicle.

Definition at line 2812 of file vehicle_gui.cpp.

References _nontrain_vehicle_details_desc, _train_vehicle_details_desc, CloseWindowById(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, BaseVehicle::type, VEH_TRAIN, WC_VEHICLE_ORDERS, and WC_VEHICLE_TIMETABLE.

Referenced by VehicleViewWindow::OnClick().

## ◆ ShowVehicleListWindow() [1/4]

void ShowVehicleListWindow | ( | CompanyID | company,
|  | VehicleType | vehicle_type
| ) |  |

Definition at line 2289 of file vehicle_gui.cpp.

## ◆ ShowVehicleListWindow() [2/4]

void ShowVehicleListWindow | ( | CompanyID | company,
|  | VehicleType | vehicle_type,
|  | StationID | station
| ) |  |

Definition at line 2308 of file vehicle_gui.cpp.

## ◆ ShowVehicleListWindow() [3/4]

void ShowVehicleListWindow | ( | CompanyID | company,
|  | VehicleType | vehicle_type,
|  | TileIndex | depot_tile
| ) |  |

Definition at line 2313 of file vehicle_gui.cpp.

## ◆ ShowVehicleListWindow() [4/4]

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

Definition at line 2303 of file vehicle_gui.cpp.

## ◆ ShowVehicleListWindowLocal()

static void ShowVehicleListWindowLocal | ( | CompanyID | company,
|  | VehicleListType | vlt,
|  | VehicleType | vehicle_type,
|  | uint32_t | unique_number
| ) |  |
| static

Definition at line 2280 of file vehicle_gui.cpp.

## ◆ ShowVehicleRefitWindow()

void ShowVehicleRefitWindow | ( | const Vehicle * | v,
|  | VehicleOrderID | order,
|  | Window * | parent,
|  | bool | auto_refit
| ) |  |

Show the refit window for a vehicle.

Parameters

  *v | The vehicle to show the refit window for
  order | of the vehicle to assign refit to, or INVALID_VEH_ORDER_ID to refit the vehicle now
  parent | the parent window of the refit window
  auto_refit | Choose cargo for auto-refitting

Definition at line 1350 of file vehicle_gui.cpp.

References CloseWindowById(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Window::parent, and WC_VEHICLE_REFIT.

Referenced by VehicleViewWindow::OnClick(), and OrdersWindow::OrderClick_Refit().

## ◆ ShowVehicleViewWindow()

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

Shows the vehicle view window of the given vehicle.

Definition at line 3432 of file vehicle_gui.cpp.

References _train_view_desc, _vehicle_view_desc, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, BaseVehicle::type, and VEH_TRAIN.

Referenced by CcBuildPrimaryVehicle(), CcCloneVehicle(), DepotWindow::DepotClick(), NewsWindow::OnClick(), VehicleListWindow::OnClick(), and DepotWindow::OnDragDrop().

## ◆ StartStopVehicle()

void StartStopVehicle | ( | const Vehicle * | v,
|  | bool | texteffect
| ) |  |

Executes CMD_START_STOP_VEHICLE for given vehicle.

Parameters

  v | Vehicle to start/stop
  texteffect | Should a texteffect be shown?

Definition at line 2938 of file vehicle_gui.cpp.

References _vehicle_msg_translation_table, CcStartStopVehicle(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Vehicle::IsPrimaryVehicle(), Vehicle::tile, and BaseVehicle::type.

Referenced by DepotWindow::DepotClick(), and VehicleViewWindow::OnClick().

## ◆ StopGlobalFollowVehicle()

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

Definition at line 3480 of file vehicle_gui.cpp.

## ◆ VehicleAgeSorter()

static bool VehicleAgeSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their age.

Definition at line 1460 of file vehicle_gui.cpp.

References Vehicle::age.

## ◆ VehicleCargoSorter()

static bool VehicleCargoSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their cargo.

Definition at line 1481 of file vehicle_gui.cpp.

References Vehicle::cargo_cap, Vehicle::cargo_type, and Vehicle::Next().

## ◆ VehicleClicked() [1/3]

bool VehicleClicked | ( | const GUIVehicleGroup & | vehgroup | ) |

Dispatch a "vehicle group selected" event if any window waits for it.

Parameters

  vehgroup | the GUIVehicleGroup representing the vehicle group

Returns
  did any window accept vehicle group selection?

Definition at line 3475 of file vehicle_gui.cpp.

References VehicleClicked(), GUIVehicleGroup::vehicles_begin, and GUIVehicleGroup::vehicles_end.

## ◆ VehicleClicked() [2/3]

bool VehicleClicked | ( | const Vehicle * | v | ) |

Dispatch a "vehicle selected" event if any window waits for it.

Parameters

  v | selected vehicle;

Returns
  did any window accept vehicle selection?

Definition at line 3442 of file vehicle_gui.cpp.

References Vehicle::First(), TileHighlightData::GetCallbackWnd(), HT_VEHICLE, Vehicle::IsPrimaryVehicle(), Window::OnVehicleSelect(), and TileHighlightData::place_mode.

Referenced by DepotWindow::DepotClick(), VehicleGroupWindow::OnClick(), VehicleListWindow::OnClick(), and VehicleClicked().

## ◆ VehicleClicked() [3/3]

bool VehicleClicked | ( | VehicleList::const_iterator | begin,
|  | VehicleList::const_iterator | end
| ) |  |

Dispatch a "vehicle group selected" event if any window waits for it.

Parameters

  begin | iterator to the start of the range of vehicles
  end | iterator to the end of the range of vehicles

Returns
  did any window accept vehicle group selection?

Definition at line 3459 of file vehicle_gui.cpp.

References TileHighlightData::GetCallbackWnd(), HT_VEHICLE, Window::OnVehicleSelect(), and TileHighlightData::place_mode.

## ◆ VehicleGroupAverageProfitLastYearSorter()

static bool VehicleGroupAverageProfitLastYearSorter | ( | const GUIVehicleGroup & | a,
|  | const GUIVehicleGroup & | b
| ) |  |
| static

Sort vehicle groups by the average profit last year.

Definition at line 1429 of file vehicle_gui.cpp.

## ◆ VehicleGroupAverageProfitThisYearSorter()

static bool VehicleGroupAverageProfitThisYearSorter | ( | const GUIVehicleGroup & | a,
|  | const GUIVehicleGroup & | b
| ) |  |
| static

Sort vehicle groups by the average profit this year.

Definition at line 1423 of file vehicle_gui.cpp.

## ◆ VehicleGroupLengthSorter()

static bool VehicleGroupLengthSorter | ( | const GUIVehicleGroup & | a,
|  | const GUIVehicleGroup & | b
| ) |  |
| static

Sort vehicle groups by the number of vehicles in the group.

Definition at line 1405 of file vehicle_gui.cpp.

## ◆ VehicleGroupTotalProfitLastYearSorter()

static bool VehicleGroupTotalProfitLastYearSorter | ( | const GUIVehicleGroup & | a,
|  | const GUIVehicleGroup & | b
| ) |  |
| static

Sort vehicle groups by the total profit last year.

Definition at line 1417 of file vehicle_gui.cpp.

## ◆ VehicleGroupTotalProfitThisYearSorter()

static bool VehicleGroupTotalProfitThisYearSorter | ( | const GUIVehicleGroup & | a,
|  | const GUIVehicleGroup & | b
| ) |  |
| static

Sort vehicle groups by the total profit this year.

Definition at line 1411 of file vehicle_gui.cpp.

## ◆ VehicleIndividualToGroupSorterWrapper()

template<BaseVehicleListWindow::VehicleIndividualSortFunction func>

static bool VehicleIndividualToGroupSorterWrapper | ( | GUIVehicleGroup const & | a,
|  | GUIVehicleGroup const & | b
| ) |  |
| static

Wrapper to convert a VehicleIndividualSortFunction to a VehicleGroupSortFunction.

Definition at line 77 of file vehicle_gui.cpp.

References GUIVehicleGroup::vehicles_begin.

## ◆ VehicleLengthSorter()

static bool VehicleLengthSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their length.

Definition at line 1534 of file vehicle_gui.cpp.

References GroundVehicleCache::cached_total_length, and Vehicle::GetGroundVehicleCache().

## ◆ VehicleMaxSpeedSorter()

static bool VehicleMaxSpeedSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their max speed.

Definition at line 1507 of file vehicle_gui.cpp.

References VehicleCache::cached_max_speed, and Vehicle::vcache.

## ◆ VehicleModelSorter()

static bool VehicleModelSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by model.

Definition at line 1514 of file vehicle_gui.cpp.

References Vehicle::engine_type.

## ◆ VehicleNameSorter()

static bool VehicleNameSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their name.

Definition at line 1441 of file vehicle_gui.cpp.

References GetString(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, and StrNaturalCompare().

## ◆ VehicleNumberSorter()

static bool VehicleNumberSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their number.

Definition at line 1435 of file vehicle_gui.cpp.

References Vehicle::unitnumber.

## ◆ VehicleProfitLastYearSorter()

static bool VehicleProfitLastYearSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by last year profit.

Definition at line 1474 of file vehicle_gui.cpp.

References Vehicle::GetDisplayProfitLastYear().

## ◆ VehicleProfitThisYearSorter()

static bool VehicleProfitThisYearSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by this year profit.

Definition at line 1467 of file vehicle_gui.cpp.

References Vehicle::GetDisplayProfitThisYear().

## ◆ VehicleReliabilitySorter()

static bool VehicleReliabilitySorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their reliability.

Definition at line 1500 of file vehicle_gui.cpp.

References Vehicle::reliability.

## ◆ VehicleTimetableDelaySorter()

static bool VehicleTimetableDelaySorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by the timetable delay.

Definition at line 1548 of file vehicle_gui.cpp.

References BaseConsist::lateness_counter.

## ◆ VehicleTimeToLiveSorter()

static bool VehicleTimeToLiveSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by the time they can still live.

Definition at line 1541 of file vehicle_gui.cpp.

References Vehicle::age, and Vehicle::max_age.

## ◆ VehicleValueSorter()

static bool VehicleValueSorter | ( | const Vehicle *const & | a,
|  | const Vehicle *const & | b
| ) |  |
| static

Sort vehicles by their value.

Definition at line 1521 of file vehicle_gui.cpp.

References Vehicle::Next(), and Vehicle::value.

## Variable Documentation

## ◆ _grouping

std::array<std::array<BaseVehicleListWindow::GroupBy, VEH_COMPANY_END>, VLT_END> _grouping {}
| static

Definition at line 53 of file vehicle_gui.cpp.

## ◆ _last_vehicle

const Vehicle* _last_vehicle[2] = { nullptr, nullptr }
| static

Definition at line 554 of file vehicle_gui.cpp.

## ◆ _nested_nontrain_vehicle_details_widgets

constexpr std::initializer_list<NWidgetPart> _nested_nontrain_vehicle_details_widgets
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VD_CAPTION),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_TOP_DETAILS), SetMinimalSize(405, 42), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_MIDDLE_DETAILS), SetMinimalSize(405, 45), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_VD_DECREASE_SERVICING_INTERVAL), SetFill(0, 1),
SetArrowWidgetTypeTip(AWV_DECREASE),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_VD_INCREASE_SERVICING_INTERVAL), SetFill(0, 1),
SetArrowWidgetTypeTip(AWV_INCREASE),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_VD_SERVICE_INTERVAL_DROPDOWN), SetFill(0, 1),
SetStringTip(STR_EMPTY, STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_SERVICING_INTERVAL), SetFill(1, 1), SetResize(1, 0), EndContainer(),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
}
SetFill
constexpr NWidgetPart SetFill(uint16_t fill_x, uint16_t fill_y)
Widget part function for setting filling.
Definition widget_type.h:1222
SetStringTip
constexpr NWidgetPart SetStringTip(StringID string, StringID tip={})
Widget part function for setting the string and tooltip.
Definition widget_type.h:1243
SetMinimalSize
constexpr NWidgetPart SetMinimalSize(int16_t x, int16_t y)
Widget part function for setting the minimal size.
Definition widget_type.h:1159
EndContainer
constexpr NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition widget_type.h:1232
SetArrowWidgetTypeTip
constexpr NWidgetPart SetArrowWidgetTypeTip(ArrowWidgetValues widget_type, StringID tip={})
Widget part function for setting the arrow widget type and tooltip.
Definition widget_type.h:1277
NWidget
constexpr NWidgetPart NWidget(WidgetType tp, Colours col, WidgetID idx=INVALID_WIDGET)
Widget part function for starting a new 'real' widget.
Definition widget_type.h:1427
SetResize
constexpr NWidgetPart SetResize(int16_t dx, int16_t dy)
Widget part function for setting the resize step.
Definition widget_type.h:1148
WID_VD_DECREASE_SERVICING_INTERVAL
@ WID_VD_DECREASE_SERVICING_INTERVAL
Decrease the servicing interval.
Definition vehicle_widget.h:52
WID_VD_CAPTION
@ WID_VD_CAPTION
Caption of window.
Definition vehicle_widget.h:49
WID_VD_SERVICE_INTERVAL_DROPDOWN
@ WID_VD_SERVICE_INTERVAL_DROPDOWN
Dropdown to select default/days/percent service interval.
Definition vehicle_widget.h:53
WID_VD_INCREASE_SERVICING_INTERVAL
@ WID_VD_INCREASE_SERVICING_INTERVAL
Increase the servicing interval.
Definition vehicle_widget.h:51
WID_VD_SERVICING_INTERVAL
@ WID_VD_SERVICING_INTERVAL
Information about the servicing interval.
Definition vehicle_widget.h:54
WID_VD_TOP_DETAILS
@ WID_VD_TOP_DETAILS
Panel with generic details.
Definition vehicle_widget.h:50
WID_VD_MIDDLE_DETAILS
@ WID_VD_MIDDLE_DETAILS
Details for non-trains.
Definition vehicle_widget.h:55
WWT_PUSHARROWBTN
@ WWT_PUSHARROWBTN
Normal push-button (no toggle button) with arrow caption.
Definition widget_type.h:107
NWID_HORIZONTAL
@ NWID_HORIZONTAL
Horizontal container.
Definition widget_type.h:66
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition widget_type.h:39
WWT_STICKYBOX
@ WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition widget_type.h:57
WWT_SHADEBOX
@ WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition widget_type.h:55
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition widget_type.h:52
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition widget_type.h:60
WWT_RESIZEBOX
@ WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition widget_type.h:59
WWT_DEFSIZEBOX
@ WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX)
Definition widget_type.h:56
WWT_DROPDOWN
@ WWT_DROPDOWN
Drop down list.
Definition widget_type.h:61
AWV_DECREASE
@ AWV_DECREASE
Arrow to the left or in case of RTL to the right.
Definition widget_type.h:20
AWV_INCREASE
@ AWV_INCREASE
Arrow to the right or in case of RTL to the left.
Definition widget_type.h:21

Vehicle details widgets (other than train).

Definition at line 2327 of file vehicle_gui.cpp.

## ◆ _nested_train_vehicle_details_widgets

constexpr std::initializer_list<NWidgetPart> _nested_train_vehicle_details_widgets
| staticconstexpr

Train details widgets.

Definition at line 2350 of file vehicle_gui.cpp.

## ◆ _nested_vehicle_list

constexpr std::initializer_list<NWidgetPart> _nested_vehicle_list
| staticconstexpr

Definition at line 1598 of file vehicle_gui.cpp.

## ◆ _nested_vehicle_refit_widgets

constexpr std::initializer_list<NWidgetPart> _nested_vehicle_refit_widgets
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VR_CAPTION),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VR_VEHICLE_PANEL_DISPLAY), SetMinimalSize(228, 14), SetResize(1, 0), SetScrollbar(WID_VR_HSCROLLBAR), EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_VR_SHOW_HSCROLLBAR),
NWidget(NWID_HSCROLLBAR, COLOUR_GREY, WID_VR_HSCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_VR_SELECT_HEADER), SetStringTip(STR_REFIT_TITLE), SetResize(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_VR_MATRIX), SetMinimalSize(228, 112), SetResize(1, 14), SetFill(1, 1), SetMatrixDataTip(1, 0), SetScrollbar(WID_VR_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_VR_SCROLLBAR),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VR_INFO), SetMinimalTextLines(2, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VR_REFIT), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
}
WidgetDimensions::unscaled
static const WidgetDimensions unscaled
Unscaled widget dimensions.
Definition window_gui.h:93
SetMatrixDataTip
constexpr NWidgetPart SetMatrixDataTip(uint32_t cols, uint32_t rows, StringID tip={})
Widget part function for setting the data and tooltip of WWT_MATRIX widgets.
Definition widget_type.h:1311
SetScrollbar
constexpr NWidgetPart SetScrollbar(WidgetID index)
Attach a scrollbar to a widget.
Definition widget_type.h:1402
SetMinimalTextLines
constexpr NWidgetPart SetMinimalTextLines(uint8_t lines, uint8_t spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition widget_type.h:1190
WID_VR_MATRIX
@ WID_VR_MATRIX
Options to refit to.
Definition vehicle_widget.h:41
WID_VR_SCROLLBAR
@ WID_VR_SCROLLBAR
Scrollbar for the refit options.
Definition vehicle_widget.h:42
WID_VR_SHOW_HSCROLLBAR
@ WID_VR_SHOW_HSCROLLBAR
Selection widget for the horizontal scrollbar.
Definition vehicle_widget.h:38
WID_VR_VEHICLE_PANEL_DISPLAY
@ WID_VR_VEHICLE_PANEL_DISPLAY
Display with a representation of the vehicle to refit.
Definition vehicle_widget.h:37
WID_VR_HSCROLLBAR
@ WID_VR_HSCROLLBAR
Horizontal scrollbar or the vehicle display.
Definition vehicle_widget.h:39
WID_VR_REFIT
@ WID_VR_REFIT
Perform the refit.
Definition vehicle_widget.h:44
WID_VR_SELECT_HEADER
@ WID_VR_SELECT_HEADER
Header with question about the cargo to carry.
Definition vehicle_widget.h:40
WID_VR_INFO
@ WID_VR_INFO
Information about the currently selected refit option.
Definition vehicle_widget.h:43
WID_VR_CAPTION
@ WID_VR_CAPTION
Caption of window.
Definition vehicle_widget.h:36
WWT_PUSHTXTBTN
@ WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition widget_type.h:105
WWT_TEXTBTN
@ WWT_TEXTBTN
(Toggle) Button with text
Definition widget_type.h:44
WWT_MATRIX
@ WWT_MATRIX
Grid of rows and columns.
Definition widget_type.h:50
NWID_VSCROLLBAR
@ NWID_VSCROLLBAR
Vertical scrollbar.
Definition widget_type.h:76
NWID_VERTICAL
@ NWID_VERTICAL
Vertical container.
Definition widget_type.h:68
NWID_HSCROLLBAR
@ NWID_HSCROLLBAR
Horizontal scrollbar.
Definition widget_type.h:75
NWID_SELECTION
@ NWID_SELECTION
Stacked widgets, only one visible at a time (eg in a panel with tabs).
Definition widget_type.h:71

Definition at line 1310 of file vehicle_gui.cpp.

## ◆ _nested_vehicle_view_widgets

constexpr std::initializer_list<NWidgetPart> _nested_vehicle_view_widgets
| staticconstexpr

Vehicle view widgets.

Definition at line 2823 of file vehicle_gui.cpp.

## ◆ _service_interval_dropdown_calendar

const StringID _service_interval_dropdown_calendar[]
| static

Initial value:
= {
STR_VEHICLE_DETAILS_DEFAULT,
STR_VEHICLE_DETAILS_DAYS,
STR_VEHICLE_DETAILS_PERCENT,
}

Definition at line 2392 of file vehicle_gui.cpp.

## ◆ _service_interval_dropdown_wallclock

const StringID _service_interval_dropdown_wallclock[]
| static

Initial value:
= {
STR_VEHICLE_DETAILS_DEFAULT,
STR_VEHICLE_DETAILS_MINUTES,
STR_VEHICLE_DETAILS_PERCENT,
}

Definition at line 2398 of file vehicle_gui.cpp.

## ◆ _sorting

std::array<Sorting, BaseVehicleListWindow::GB_END> _sorting {}
| static

Definition at line 54 of file vehicle_gui.cpp.

## ◆ _train_view_desc

WindowDesc _train_view_desc(WDP_AUTO, "view_vehicle_train", 250, 134, WC_VEHICLE_VIEW, WC_NONE, {}, _nested_vehicle_view_widgets, &VehicleViewWindow::hotkeys) | ( | WDP_AUTO | ,
|  | "view_vehicle_train" | ,
|  | 250 | ,
|  | 134 | ,
|  | WC_VEHICLE_VIEW | ,
|  | WC_NONE | ,
|  | {} | ,
|  | _nested_vehicle_view_widgets | ,
|  | &VehicleViewWindow::hotkeys |
| ) |  |
| static

Vehicle view window descriptor for trains.

Only minimum_height and default_height are different for train view.

Referenced by ShowVehicleViewWindow().

## ◆ _vehicle_group_filter_funcs

GUIVehicleGroupList::FilterFunction* const _vehicle_group_filter_funcs[]
| static

Initial value:
= {
&CargoFilter,
}
CargoFilter
static bool CargoFilter(const GUIVehicleGroup *vehgroup, const CargoType cargo_type)
Check whether a vehicle can carry a specific cargo.
Definition vehicle_gui.cpp:321

Definition at line 409 of file vehicle_gui.cpp.

## ◆ _vehicle_list_desc

WindowDesc _vehicle_list_desc[]
| static

Initial value:
= {
{
WDP_AUTO, "list_vehicles_train", 325, 246,
WC_TRAINS_LIST, WC_NONE,
{},
_nested_vehicle_list
},
{
WDP_AUTO, "list_vehicles_roadveh", 260, 246,
WC_ROADVEH_LIST, WC_NONE,
{},
_nested_vehicle_list
},
{
WDP_AUTO, "list_vehicles_ship", 260, 246,
WC_SHIPS_LIST, WC_NONE,
{},
_nested_vehicle_list
},
{
WDP_AUTO, "list_vehicles_aircraft", 260, 246,
WC_AIRCRAFT_LIST, WC_NONE,
{},
_nested_vehicle_list
}
}
WDP_AUTO
@ WDP_AUTO
Find a place automatically.
Definition window_gui.h:144
WC_ROADVEH_LIST
@ WC_ROADVEH_LIST
Road vehicle list; Window numbers:
Definition window_type.h:319
WC_NONE
@ WC_NONE
No window, redirects to WC_MAIN_WINDOW.
Definition window_type.h:50
WC_SHIPS_LIST
@ WC_SHIPS_LIST
Ships list; Window numbers:
Definition window_type.h:325
WC_TRAINS_LIST
@ WC_TRAINS_LIST
Trains list; Window numbers:
Definition window_type.h:313
WC_AIRCRAFT_LIST
@ WC_AIRCRAFT_LIST
Aircraft list; Window numbers:
Definition window_type.h:331

Definition at line 2253 of file vehicle_gui.cpp.

## ◆ _vehicle_msg_translation_table

const StringID _vehicle_msg_translation_table[][4]
| static

Initial value:
= {
{
STR_ERROR_CAN_T_STOP_START_TRAIN,
STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE,
STR_ERROR_CAN_T_STOP_START_SHIP,
STR_ERROR_CAN_T_STOP_START_AIRCRAFT
},
{
STR_ERROR_CAN_T_BUY_TRAIN,
STR_ERROR_CAN_T_BUY_ROAD_VEHICLE,
STR_ERROR_CAN_T_BUY_SHIP,
STR_ERROR_CAN_T_BUY_AIRCRAFT
},
{
STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN,
STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN,
INVALID_STRING_ID,
INVALID_STRING_ID
},
}
INVALID_STRING_ID
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
Definition strings_type.h:20

Command codes for the shared buttons indexed by VehicleCommandTranslation and vehicle type.

Definition at line 2895 of file vehicle_gui.cpp.

Referenced by VehicleViewWindow::OnClick(), and StartStopVehicle().

## ◆ _vehicle_view_zoom_levels

const ZoomLevel _vehicle_view_zoom_levels[]
| static

Initial value:
= {
ZoomLevel::Train,
ZoomLevel::RoadVehicle,
ZoomLevel::Ship,
ZoomLevel::Aircraft,
}
ZoomLevel::Ship
@ Ship
Default zoom level for the ship view.
ZoomLevel::RoadVehicle
@ RoadVehicle
Default zoom level for the road vehicle view.
ZoomLevel::Aircraft
@ Aircraft
Default zoom level for the aircraft view.
ZoomLevel::Train
@ Train
Default zoom level for the train view.

Zoom levels for vehicle views indexed by vehicle type.

Definition at line 2875 of file vehicle_gui.cpp.

## ◆ MAX_REFIT_CYCLE

const uint MAX_REFIT_CYCLE = 256
| static

Maximum number of refit cycles we try, to prevent infinite loops.

And we store only a byte anyway

Definition at line 589 of file vehicle_gui.cpp.

Referenced by RefitWindow::BuildRefitList(), and GetBestFittingSubType().

## ◆ VehicleAgeSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleAgeSorter
| static

Definition at line 58 of file vehicle_gui.cpp.

## ◆ VehicleCargoSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleCargoSorter
| static

Definition at line 61 of file vehicle_gui.cpp.

## ◆ VehicleGroupAverageProfitLastYearSorter

BaseVehicleListWindow::VehicleGroupSortFunction VehicleGroupAverageProfitLastYearSorter
| static

Definition at line 73 of file vehicle_gui.cpp.

## ◆ VehicleGroupAverageProfitThisYearSorter

BaseVehicleListWindow::VehicleGroupSortFunction VehicleGroupAverageProfitThisYearSorter
| static

Definition at line 72 of file vehicle_gui.cpp.

## ◆ VehicleGroupLengthSorter

BaseVehicleListWindow::VehicleGroupSortFunction VehicleGroupLengthSorter
| static

Definition at line 69 of file vehicle_gui.cpp.

## ◆ VehicleGroupTotalProfitLastYearSorter

BaseVehicleListWindow::VehicleGroupSortFunction VehicleGroupTotalProfitLastYearSorter
| static

Definition at line 71 of file vehicle_gui.cpp.

## ◆ VehicleGroupTotalProfitThisYearSorter

BaseVehicleListWindow::VehicleGroupSortFunction VehicleGroupTotalProfitThisYearSorter
| static

Definition at line 70 of file vehicle_gui.cpp.

## ◆ VehicleLengthSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleLengthSorter
| static

Definition at line 66 of file vehicle_gui.cpp.

## ◆ VehicleMaxSpeedSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleMaxSpeedSorter
| static

Definition at line 63 of file vehicle_gui.cpp.

## ◆ VehicleModelSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleModelSorter
| static

Definition at line 64 of file vehicle_gui.cpp.

## ◆ VehicleNameSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleNameSorter
| static

Definition at line 57 of file vehicle_gui.cpp.

## ◆ VehicleNumberSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleNumberSorter
| static

Definition at line 56 of file vehicle_gui.cpp.

## ◆ VehicleProfitLastYearSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleProfitLastYearSorter
| static

Definition at line 60 of file vehicle_gui.cpp.

## ◆ VehicleProfitThisYearSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleProfitThisYearSorter
| static

Definition at line 59 of file vehicle_gui.cpp.

## ◆ VehicleReliabilitySorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleReliabilitySorter
| static

Definition at line 62 of file vehicle_gui.cpp.

## ◆ VehicleTimetableDelaySorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleTimetableDelaySorter
| static

Definition at line 68 of file vehicle_gui.cpp.

## ◆ VehicleTimeToLiveSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleTimeToLiveSorter
| static

Definition at line 67 of file vehicle_gui.cpp.

## ◆ VehicleValueSorter

BaseVehicleListWindow::VehicleIndividualSortFunction VehicleValueSorter
| static

Definition at line 65 of file vehicle_gui.cpp.

## ◆ VV_INITIAL_VIEWPORT_HEIGHT

const int VV_INITIAL_VIEWPORT_HEIGHT = 84
| static

Definition at line 2884 of file vehicle_gui.cpp.

## ◆ VV_INITIAL_VIEWPORT_HEIGHT_TRAIN

const int VV_INITIAL_VIEWPORT_HEIGHT_TRAIN = 102
| static

Definition at line 2885 of file vehicle_gui.cpp.

## ◆ VV_INITIAL_VIEWPORT_WIDTH

const int VV_INITIAL_VIEWPORT_WIDTH = 226
| static

Definition at line 2883 of file vehicle_gui.cpp.