Fixed Hud

Hopefully the last commit for 0.4
This commit is contained in:
P3rlE 2022-03-02 17:14:45 +01:00
parent 6473a31a0f
commit e8de4d00a0
2 changed files with 19 additions and 15 deletions

View file

@ -422,9 +422,9 @@ static float CG_DrawTimes( float y ) {
Com_sprintf(s, sizeof(s), "B: %s", time); Com_sprintf(s, sizeof(s), "B: %s", time);
// x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH; // x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH;
x = 636 - 120; x = 636 - 80;
CG_FillRect ( x, y, 120, 18, bgColor ); CG_FillRect ( x, y, 90, 18, bgColor );
x+= 25; x+= 10;
y+= 4; y+= 4;
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
y += TINYCHAR_HEIGHT + 4; y += TINYCHAR_HEIGHT + 4;
@ -441,9 +441,9 @@ static float CG_DrawTimes( float y ) {
Com_sprintf(s, sizeof(s), "L: %s", time); Com_sprintf(s, sizeof(s), "L: %s", time);
// x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH; // x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH;
x = 636 - 120; x = 636 - 80;
CG_FillRect( x, y, 120, 18, bgColor ); CG_FillRect( x, y, 90, 18, bgColor );
x+= 25; x+= 10;
y+= 4; y+= 4;
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
y += TINYCHAR_HEIGHT + 4; y += TINYCHAR_HEIGHT + 4;
@ -467,9 +467,9 @@ static float CG_DrawTimes( float y ) {
Com_sprintf(s, sizeof(s), "T: %s", time); Com_sprintf(s, sizeof(s), "T: %s", time);
x = 636 - 120; x = 636 - 80;
CG_FillRect( x, y, 120, 18, bgColor ); CG_FillRect( x, y, 90, 18, bgColor );
x += 25; x += 10;
y += 4; y += 4;
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
y += TINYCHAR_HEIGHT + 4; y += TINYCHAR_HEIGHT + 4;
@ -501,9 +501,9 @@ static float CG_DrawLaps( float y ) {
Com_sprintf(s, sizeof(s), "LAP: %i/%i", curLap, numLaps); Com_sprintf(s, sizeof(s), "LAP: %i/%i", curLap, numLaps);
x = 636 - 120; x = 636 - 80;
CG_FillRect( x, y, 120, 18, bgColor ); CG_FillRect( x, y, 90, 18, bgColor );
x += 25; x += 10;
y += 4; y += 4;
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
y += TINYCHAR_HEIGHT + 4; y += TINYCHAR_HEIGHT + 4;
@ -547,7 +547,7 @@ static float CG_DrawCurrentPosition( float y ) {
CG_DrawTinyDigitalStringColor( x, y, va("%i/%i", pos, cgs.numRacers), colorWhite); CG_DrawTinyDigitalStringColor( x, y, va("%i/%i", pos, cgs.numRacers), colorWhite);
y += 10 + 4; y += 20;
return y; return y;
} }

View file

@ -892,12 +892,13 @@ q3rallycode
4=engine\code\cgame\cg_players.c 4=engine\code\cgame\cg_players.c
5=engine\code\cgame\cg_draw.c 5=engine\code\cgame\cg_draw.c
6=engine\code\game\bg_public.h 6=engine\code\game\bg_public.h
7=engine\code\cgame\cg_rally_hud.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\cgame\cg_rally_hud.c
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=58 TopLine=58
Caret=35,70 Caret=31,70
[engine\code\cgame\cg_ents.c] [engine\code\cgame\cg_ents.c]
TopLine=144 TopLine=144
Caret=1,160 Caret=1,160
@ -916,3 +917,6 @@ Caret=1,336
[engine\code\game\bg_public.h] [engine\code\game\bg_public.h]
TopLine=390 TopLine=390
Caret=3,408 Caret=3,408
[engine\code\cgame\cg_rally_hud.c]
TopLine=532
Caret=9,550