(svn r17771) -Codechange: use the 'StringID' function instead of the 'const char *' function + custom code to resolve the 'const char *' from the 'StringID'

This commit is contained in:
rubidium 2009-10-13 19:24:58 +00:00
parent 210d3cc108
commit 313fb65943
1 changed files with 1 additions and 3 deletions

View File

@ -841,11 +841,9 @@ void GuiShowTooltips(StringID str, uint paramcount, const uint64 params[], bool
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 */