From 7bcd03c05e496df91607c16aa7157ce1bd609265 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Mon, 31 Jan 2022 15:39:08 -0800 Subject: [PATCH] Client: Change Font_GetStringWidth() to Font_StringWidth(). --- src/client/font.h | 2 +- src/client/font.qc | 2 +- src/client/text.qc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/font.h b/src/client/font.h index 2d94a454..be75fef6 100644 --- a/src/client/font.h +++ b/src/client/font.h @@ -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); diff --git a/src/client/font.qc b/src/client/font.qc index 9ff40d62..28c585e3 100644 --- a/src/client/font.qc +++ b/src/client/font.qc @@ -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]); diff --git a/src/client/text.qc b/src/client/text.qc index 37f580ee..cff2bacc 100644 --- a/src/client/text.qc +++ b/src/client/text.qc @@ -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);