Client: Change Font_GetStringWidth() to Font_StringWidth().

This commit is contained in:
Marco Cawthorne 2022-01-31 15:39:08 -08:00
parent e11465018f
commit 7bcd03c05e
Signed by: eukara
GPG key ID: C196CD8BA993248A
3 changed files with 3 additions and 3 deletions

View file

@ -38,5 +38,5 @@ void Font_DrawText_RGBA(vector vecOrigin, string strText, vector col, float a, f
void Font_DrawField(vector vecOrigin, vector vecSize, string strText, font_s fnt, int iAlignFlags);
string Font_RGBtoHex(vector vecColor);
int Font_GetHeight(font_s);
float Font_GetStringWidth(string strText, float flColors, font_s fnt);
float Font_StringWidth(string strText, float flColors, font_s fnt);
float Font_GetID(font_s fnt);

View file

@ -154,7 +154,7 @@ Font_GetHeight(font_s fnt)
}
float
Font_GetStringWidth(string strText, float flColors, font_s fnt)
Font_StringWidth(string strText, float flColors, font_s fnt)
{
drawfont = (float)fnt.iID;
stringwidth(strText, flColors, [(float)fnt.iScaleX,(float)fnt.iScaleY]);

View file

@ -50,7 +50,7 @@ GameText_DrawString(vector pos, string msg, vector col, float alpha)
int c = tokenizebyseparator(msg, "\n");
for (int i = 0; i < c; i++) {
float strwidth = Font_GetStringWidth(argv(i), TRUE, FONT_20);
float strwidth = Font_StringWidth(argv(i), TRUE, FONT_20);
if (pos[0] == -1) {
rpos[0] = g_hudmins[0] + (g_hudres[0] / 2) - (strwidth/2);