summaryrefslogtreecommitdiff
path: root/viewport.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-09-16 13:20:14 +0000
committerDarkvater <darkvater@openttd.org>2006-09-16 13:20:14 +0000
commit3ccc87b376a5560e3933263dc0e684ddf1136236 (patch)
treecfe40a58aa6ed11051036a76e69dd295f0b05d31 /viewport.c
parentba3ae8e43d19e4553a8c753c66c6a199b28cc1e1 (diff)
downloadopenttd-3ccc87b376a5560e3933263dc0e684ddf1136236.tar.xz
(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
Diffstat (limited to 'viewport.c')
-rw-r--r--viewport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/viewport.c b/viewport.c
index f6ff534f7..f21b5b0a7 100644
--- a/viewport.c
+++ b/viewport.c
@@ -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;
}