(svn r25816) -Add [FS#5748]: Toggle button for wrapping lines in the textfile GUI (LordAro)

This commit is contained in:
frosch
2013-10-06 11:29:14 +00:00
parent f26aad2e84
commit dfa0e61f25
7 changed files with 80 additions and 32 deletions

View File

@@ -535,9 +535,9 @@ int DrawString(int left, int right, int top, StringID str, TextColour colour, St
* @param maxw maximum string width
* @return height of pixels of string when it is drawn
*/
static int GetStringHeight(const char *str, int maxw)
int GetStringHeight(const char *str, int maxw, FontSize fontsize)
{
Layouter layout(str, maxw);
Layouter layout(str, maxw, TC_FROMSTRING, fontsize);
return layout.GetBounds().height;
}