diff options
author | Darkvater <darkvater@openttd.org> | 2006-09-16 13:20:14 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-09-16 13:20:14 +0000 |
commit | 3ccc87b376a5560e3933263dc0e684ddf1136236 (patch) | |
tree | cfe40a58aa6ed11051036a76e69dd295f0b05d31 /misc_gui.c | |
parent | ba3ae8e43d19e4553a8c753c66c6a199b28cc1e1 (diff) | |
download | openttd-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 'misc_gui.c')
-rw-r--r-- | misc_gui.c | 4 |
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; |