Skip to content

Commit f7a6ebc

Browse files
committed
Add in-game HUD options menu (Shift+H)
Introduces a two-column overlay menu toggled with Shift+H or Esc, allowing players to enable/disable individual HUD elements without leaving the game. Replaces the previous all-or-nothing HUD toggle. Registers dedicated CVars for all HUD elements (CVAR_ARCHIVE) Redundant CVars removed in favour of native ones (cg_drawRearView, cg_drawMMap, cg_derbyHitFxEnable) Checkpoint Arrow cycles through all three states: Off / On HUD / Above Car Derby and Scores Panel entries are greyed out and non-interactive when not applicable to the current game type Fuel Gauge follows Speedometer (no separate toggle needed) Menu input is isolated from the game: Shift+H sets KEYCATCH_CGAME, preventing chat and other binds from firing while the menu is open Cursor rendered via menu/art/3_cursor2; mouse click toggles entries directly Layout: 560px wide panel, two columns (Racing left, Derby/Vehicle right), BIGCHAR title, TINYCHAR hint, uniform badge width for clean alignment Refactored from monolithic cg_rally_hud.c/.c2 into cg_hud_core.c, cg_hud_racing.c, cg_hud_derby.c, cg_hud_vehicle.c
1 parent 0d74d5c commit f7a6ebc

File tree

10 files changed

+2511
-5
lines changed

10 files changed

+2511
-5
lines changed

engine/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2729,8 +2729,10 @@ Q3CGOBJ_ = \
27292729
$(B)/$(BASEGAME)/cgame/cg_predict.o \
27302730
$(B)/$(BASEGAME)/cgame/cg_rally_draw.o \
27312731
$(B)/$(BASEGAME)/cgame/cg_rally_drawtools.o \
2732-
$(B)/$(BASEGAME)/cgame/cg_rally_hud.o \
2733-
$(B)/$(BASEGAME)/cgame/cg_rally_hud2.o \
2732+
$(B)/$(BASEGAME)/cgame/cg_hud_core.o \
2733+
$(B)/$(BASEGAME)/cgame/cg_hud_racing.o \
2734+
$(B)/$(BASEGAME)/cgame/cg_hud_derby.o \
2735+
$(B)/$(BASEGAME)/cgame/cg_hud_vehicle.o \
27342736
$(B)/$(BASEGAME)/cgame/cg_rally_platetools.o \
27352737
$(B)/$(BASEGAME)/cgame/cg_rally_racetools.o \
27362738
$(B)/$(BASEGAME)/cgame/cg_rally_rearweapons.o \

engine/code/cgame/cg_draw.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2525
// active (after loading) gameplay
2626

2727
#include "cg_local.h"
28+
#include "cg_hud_elements.h"
2829

2930
#ifdef MISSIONPACK
3031
#include "../ui/ui_shared.h"
@@ -3168,6 +3169,7 @@ static void CG_DrawIntermission( stereoFrame_t stereoFrame ) {
31683169

31693170
// Q3Rally Code Start
31703171
cg.scoreBoardShowing = CG_DrawHUD();
3172+
CG_DrawHUDOptionsMenu();
31713173

31723174
if ( stereoFrame == STEREO_CENTER ) {
31733175
CG_JukeboxFrame();
@@ -3510,7 +3512,7 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
35103512
CG_DrawFollow();
35113513

35123514
cg.scoreBoardShowing = CG_DrawHUD();
3513-
3515+
CG_DrawHUDOptionsMenu();
35143516

35153517
// don't draw center string if scoreboard is up
35163518

0 commit comments

Comments
 (0)