* Get maximum width of a list of strings. * @param list List of strings. * @param fontsize Font size to use. * @return Width of longest string within the list. */
| 918 | * @return Width of longest string within the list. |
| 919 | */ |
| 920 | uint GetStringListWidth(std::span<const StringID> list, FontSize fontsize) |
| 921 | { |
| 922 | uint width = 0; |
| 923 | for (auto str : list) { |
| 924 | width = std::max(width, GetStringBoundingBox(str, fontsize).width); |
| 925 | } |
| 926 | return width; |
| 927 | } |
| 928 | |
| 929 | /** |
| 930 | * Get maximum dimension of a list of strings. |
no test coverage detected