(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

@@ -1018,13 +1018,13 @@ void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str)
sign->top = top;
GetString(buffer, str);
w = GetStringWidth(buffer) + 3;
w = GetStringBoundingBox(buffer).width + 3;
sign->width_1 = w;
sign->left = left - w / 2;
// zoomed out version
/* zoomed out version */
_cur_fontsize = FS_SMALL;
w = GetStringWidth(buffer) + 3;
w = GetStringBoundingBox(buffer).width + 3;
_cur_fontsize = FS_NORMAL;
sign->width_2 = w;
}