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

Function GetEngineListHeight

src/build_vehicle_gui.cpp:56–59  ·  view source on GitHub ↗

* Get the height of a single 'entry' in the engine lists. * @param type the vehicle type to get the height of * @return the height for the entry */

Source from the content-addressed store, hash-verified

54 * @return the height for the entry
55 */
56uint GetEngineListHeight(VehicleType type)
57{
58 return std::max<uint>(GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.matrix.Vertical(), GetVehicleImageCellSize(type, EIT_PURCHASE).height);
59}
60
61static constexpr std::initializer_list<NWidgetPart> _nested_build_vehicle_widgets = {
62 NWidget(NWID_HORIZONTAL),

Callers 3

UpdateWidgetSizeMethod · 0.85
DrawEngineListFunction · 0.85
UpdateWidgetSizeMethod · 0.85

Calls 3

GetCharacterHeightFunction · 0.85
GetVehicleImageCellSizeFunction · 0.85
VerticalMethod · 0.80

Tested by

no test coverage detected