Use Font_GetID() in the places where drawfont is used.

This commit is contained in:
Marco Cawthorne 2021-11-04 22:49:53 +01:00
parent 065bbcd339
commit 06af7f9e33
Signed by: eukara
GPG Key ID: C196CD8BA993248A
7 changed files with 14 additions and 15 deletions

View File

@ -443,7 +443,7 @@ HUD_DrawSpectator(void)
spectator spec = (spectator)pSeat->m_ePlayer; spectator spec = (spectator)pSeat->m_ePlayer;
drawfont = FONT_20; drawfont = Font_GetID(FONT_20);
vector vecPos; vector vecPos;
string strText; string strText;

View File

@ -147,7 +147,7 @@ Obituary_Draw(void)
int i; int i;
vector pos; vector pos;
vector item; vector item;
drawfont = FONT_CON; drawfont = Font_GetID(FONT_CON);
pos = g_hudmins + [g_hudres[0] - 18, 56]; pos = g_hudmins + [g_hudres[0] - 18, 56];
if (g_obituary_time <= 0 && g_obituary_count > 0) { if (g_obituary_time <= 0 && g_obituary_count > 0) {

View File

@ -31,7 +31,7 @@ Scores_DrawTeam(player pl, vector pos)
{ {
drawfill(pos, [290, 1], SCORE_LINE_C, 1.0f, DRAWFLAG_ADDITIVE); drawfill(pos, [290, 1], SCORE_LINE_C, 1.0f, DRAWFLAG_ADDITIVE);
drawfont = FONT_20; drawfont = Font_GetID(FONT_20);
drawstring(pos + [0,-18], "Teams", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE); drawstring(pos + [0,-18], "Teams", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE);
drawstring(pos + [124,-18], "kills / deaths", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE); drawstring(pos + [124,-18], "kills / deaths", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE);
drawstring(pos + [240,-18], "latency", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE); drawstring(pos + [240,-18], "latency", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE);
@ -97,7 +97,7 @@ Scores_DrawTeam(player pl, vector pos)
pos[1] += 12; pos[1] += 12;
} }
drawfont = FONT_CON; drawfont = Font_GetID(FONT_CON);
} }
void void
@ -105,7 +105,7 @@ Scores_DrawNormal(player pl, vector pos)
{ {
drawfill(pos, [290, 1], SCORE_LINE_C, 1.0f, DRAWFLAG_ADDITIVE); drawfill(pos, [290, 1], SCORE_LINE_C, 1.0f, DRAWFLAG_ADDITIVE);
drawfont = FONT_20; drawfont = Font_GetID(FONT_20);
drawstring(pos + [0,-18], "Player", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE); drawstring(pos + [0,-18], "Player", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE);
drawstring(pos + [124,-18], "kills / deaths", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE); drawstring(pos + [124,-18], "kills / deaths", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE);
drawstring(pos + [240,-18], "latency", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE); drawstring(pos + [240,-18], "latency", [20,20], SCORE_HEADER_C, 1.0f, DRAWFLAG_ADDITIVE);
@ -151,7 +151,7 @@ Scores_DrawNormal(player pl, vector pos)
pos[1] += 20; pos[1] += 20;
} }
drawfont = FONT_CON; drawfont = Font_GetID(FONT_CON);
} }
void void

View File

@ -0,0 +1,2 @@
path "CONCHARS?fmt=h"
size 12

View File

@ -1,3 +1,2 @@
name "16" path fonts/default
font "fonts/default" size 16
size "16"

View File

@ -1,3 +1,2 @@
name "cr" path "creditsfont?fmt=h"
font "creditsfont?fmt=h" size 20
size "20"

View File

@ -1,3 +1,2 @@
name "font" path "CONCHARS?fmt=h"
font "" size 12
size "12"