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 /players.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 'players.c')
-rw-r--r-- | players.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -344,7 +344,7 @@ verify_name:; } GetString(buffer, str); - if (strlen(buffer) >= 32 || GetStringWidth(buffer) >= 150) + if (strlen(buffer) >= 32 || GetStringBoundingBox(buffer).width >= 150) goto bad_town_name; set_name:; @@ -451,7 +451,7 @@ restart:; SetDParam(0, p->president_name_2); GetString(buffer, p->president_name_1); - if (strlen(buffer) >= 32 || GetStringWidth(buffer) >= 94) + if (strlen(buffer) >= 32 || GetStringBoundingBox(buffer).width >= 94) continue; FOR_ALL_PLAYERS(pp) { |