Mercurial > hg > openttd
changeset 13262:4738f109dfbb draft
(svn r17771) -Codechange: use the 'StringID' function instead of the 'const char *' function + custom code to resolve the 'const char *' from the 'StringID'
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 13 Oct 2009 19:24:58 +0000 |
parents | 3aa21603e65f |
children | d65c47851aab |
files | src/misc_gui.cpp |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -841,11 +841,9 @@ if (str == STR_NULL) return; for (uint i = 0; i != paramcount; i++) SetDParam(i, params[i]); - char buffer[512]; - GetString(buffer, str, lastof(buffer)); Dimension br; - br.width = min(GetStringBoundingBox(buffer).width, 194); + br.width = min(GetStringBoundingBox(str).width, 194); br.height = GetStringHeight(str, br.width); /* increase slightly to have some space around the box */