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

Method GetMaxHelpHeight

src/settingentry_gui.cpp:166–169  ·  view source on GitHub ↗

* Get the biggest height of the help text(s), if the width is at least \a maxw. Help text gets wrapped if needed. * @param maxw Maximal width of a line help text. * @return Biggest height needed to display any help text of this node (and its descendants). */

Source from the content-addressed store, hash-verified

164 * @return Biggest height needed to display any help text of this node (and its descendants).
165 */
166uint SettingEntry::GetMaxHelpHeight(int maxw)
167{
168 return GetStringHeight(this->setting->GetHelp(), maxw);
169}
170
171/**
172 * Checks whether an entry shall be made visible based on the restriction mode.

Callers 1

UpdateHelpTextSizeMethod · 0.45

Calls 2

GetStringHeightFunction · 0.85
GetHelpMethod · 0.80

Tested by

no test coverage detected