OpenTTD Source: src/vehicle_gui_base.h File Reference

OpenTTD Source 13.1

Data Structures | Typedefs | Functions | Variables
vehicle_gui_base.h File Reference
`#include "core/smallvec_type.hpp"`
`#include "cargo_type.h"`
`#include "date_type.h"`
`#include "economy_type.h"`
`#include "sortlist_type.h"`
`#include "vehicle_base.h"`
`#include "vehiclelist.h"`
`#include "window_gui.h"`
`#include "widgets/dropdown_type.h"`
`#include <iterator>`
`#include <numeric>`

Go to the source code of this file.

## Data Structures
struct | GUIVehicleGroup
struct | BaseVehicleListWindow
struct | Sorting

## Typedefs
typedef GUIList< const Vehicle *, CargoID > | GUIVehicleList
typedef GUIList< GUIVehicleGroup, CargoID > | GUIVehicleGroupList

## Functions
uint | GetVehicleListHeight (VehicleType type, uint divisor=1)
| Get the height of a vehicle in the vehicle list GUIs. More...

## Variables
BaseVehicleListWindow::GroupBy | _grouping [VLT_END][VEH_COMPANY_END]
Sorting | _sorting [BaseVehicleListWindow::GB_END]

## Detailed Description

Functions/classes shared between the different vehicle list GUIs.

Definition in file vehicle_gui_base.h.

## Function Documentation

## ◆ 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 1625 of file vehicle_gui.cpp.

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

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