mirror of https://github.com/OpenTTD/OpenTTD
(svn r17771) -Codechange: use the 'StringID' function instead of the 'const char *' function + custom code to resolve the 'const char *' from the 'StringID'
parent
210d3cc108
commit
313fb65943
|
@ -841,11 +841,9 @@ void GuiShowTooltips(StringID str, uint paramcount, const uint64 params[], bool
|
||||||
if (str == STR_NULL) return;
|
if (str == STR_NULL) return;
|
||||||
|
|
||||||
for (uint i = 0; i != paramcount; i++) SetDParam(i, params[i]);
|
for (uint i = 0; i != paramcount; i++) SetDParam(i, params[i]);
|
||||||
char buffer[512];
|
|
||||||
GetString(buffer, str, lastof(buffer));
|
|
||||||
|
|
||||||
Dimension br;
|
Dimension br;
|
||||||
br.width = min(GetStringBoundingBox(buffer).width, 194);
|
br.width = min(GetStringBoundingBox(str).width, 194);
|
||||||
br.height = GetStringHeight(str, br.width);
|
br.height = GetStringHeight(str, br.width);
|
||||||
|
|
||||||
/* increase slightly to have some space around the box */
|
/* increase slightly to have some space around the box */
|
||||||
|
|
Loading…
Reference in New Issue