(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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user