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

Method GetNumberColumnsLegend

src/smallmap_gui.cpp:706–709  ·  view source on GitHub ↗

* Return number of columns that can be displayed in \a width pixels. * @return Number of columns to display. */

Source from the content-addressed store, hash-verified

704 * @return Number of columns to display.
705 */
706 inline uint GetNumberColumnsLegend(uint width) const
707 {
708 return width / this->column_width;
709 }
710
711 /**
712 * Compute height given a number of columns.

Callers 3

GetPositionOnLegendMethod · 0.95
DrawWidgetMethod · 0.95
AssignSizePositionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected