(svn r2644) - Fix: my name was mistyped ;p

- Add DoDrawStringCentered() and change the multiline strings in the about box to single-line ones
This commit is contained in:
Darkvater
2005-07-19 22:12:04 +00:00
parent 7c694f2553
commit f0c0c03c5f
4 changed files with 12 additions and 3 deletions

7
gfx.c
View File

@@ -365,6 +365,13 @@ int DrawStringCenteredTruncated(int xl, int xr, int y, StringID str, uint16 colo
return DoDrawString(buffer, (xl + xr - w) / 2, y, color);
}
int DoDrawStringCentered(int x, int y, const char *str, uint16 color)
{
int w = GetStringWidth(str);
DoDrawString(str, x - w / 2, y, color);
return w;
}
void DrawStringCenterUnderline(int x, int y, StringID str, uint16 color)
{
int w = DrawStringCentered(x, y, str, color);