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

Method GetLegendHeight

src/smallmap_gui.cpp:716–720  ·  view source on GitHub ↗

* Compute height given a number of columns. * @param num_columns Number of columns. * @return Needed height for displaying the smallmap legends in pixels. */

Source from the content-addressed store, hash-verified

714 * @return Needed height for displaying the smallmap legends in pixels.
715 */
716 inline uint GetLegendHeight(uint num_columns) const
717 {
718 return WidgetDimensions::scaled.framerect.Vertical() +
719 this->GetNumberRowsLegend(num_columns) * GetCharacterHeight(FS_SMALL);
720 }
721
722 /**
723 * Get a bitmask for company links to be displayed. Usually this will be

Callers 2

SetupSmallestSizeMethod · 0.80
AssignSizePositionMethod · 0.80

Calls 3

GetNumberRowsLegendMethod · 0.95
GetCharacterHeightFunction · 0.85
VerticalMethod · 0.80

Tested by

no test coverage detected