summaryrefslogtreecommitdiff
path: root/misc_gui.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
commit552570f9e6ed3982c1b8d5bd819eb06eb4c5df53 (patch)
treecfe40a58aa6ed11051036a76e69dd295f0b05d31 /misc_gui.c
parentdca7aa29f6597474f266a67968ea0090e9e1ac74 (diff)
downloadopenttd-552570f9e6ed3982c1b8d5bd819eb06eb4c5df53.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 'misc_gui.c')
-rw-r--r--misc_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 77c8630c0..491f0912e 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -666,7 +666,7 @@ void GuiShowTooltips(StringID string_id)
GetString(buffer, string_id);
- right = GetStringWidth(buffer) + 6;
+ right = GetStringBoundingBox(buffer).width + 6;
/* Cut tooltip length to 200 pixels max, wrap to new line if longer */
bottom = 14;
@@ -1776,7 +1776,7 @@ static void CheatsWndProc(Window *w, WindowEvent *e)
case STR_CHEAT_CHANGE_PLAYER:
SetDParam(0, val);
GetString(buf, STR_CHEAT_CHANGE_PLAYER);
- DrawPlayerIcon(_current_player, 60 + GetStringWidth(buf), y + 2);
+ DrawPlayerIcon(_current_player, 60 + GetStringBoundingBox(buf).width, y + 2);
break;
/* Set correct string for switch climate cheat */
case STR_CHEAT_SWITCH_CLIMATE: val += STR_TEMPERATE_LANDSCAPE;