(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding

box of the string. Therefore rename the function to GetStringBoundingRect()
 and have it return a BoundingRect type of width/height
This commit is contained in:
Darkvater
2006-09-16 13:20:14 +00:00
parent ba3ae8e43d
commit 3ccc87b376
9 changed files with 53 additions and 27 deletions

View File

@@ -304,7 +304,7 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
DrawString( 12, 91, STR_HEIGHTMAP_NAME, 0x10);
SetDParam(0, _heightmap_str);
DrawStringTruncated(114, 91, STR_ORANGE, 0x10, 326 - 114 - GetStringWidth(buffer) - 5);
DrawStringTruncated(114, 91, STR_ORANGE, 0x10, 326 - 114 - GetStringBoundingBox(buffer).width - 5);
/* TODO -- Remove next 2 lines if 32 widget limit is removed */
DrawFrameRect(114, 196, 219, 207, 12, 0);