Skip to content

Commit

Permalink
Classic UI: Adjusted menu item positioning, removed HUD from all othe…
Browse files Browse the repository at this point in the history
…r submenus, and added `cg_hitSound` to Sound. (#262)

Last commit before oaxb53!
  • Loading branch information
NeonKnightOA authored Mar 22, 2024
1 parent 99cec7d commit bce9989
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 184 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* New H.U.D. menu, accessible from Setup, controls the elements that are displayed in, well, the HUD, including the crosshair and weapon bar. Among the new options added and not mentioned later in this changelog:
* Transplanted from Video: `cg_drawFPS` (_"Draw FPS"_).
* Transplanted from Game Options: `cg_drawCrosshair` (_"Crosshair Style"_), `cg_crosshairHealth` (_"Crosshair Shows Health"_), `cg_crosshairColorRed` (_"Crosshair Color (Red)"_), `cg_crosshairColorGreen` (_"Crosshair Color (Green)"_), `cg_crosshairColorBlue` (_"Crosshair Color (Blue)"_), `cg_alwaysWeaponBar` (_"Always Show Weapon Bar"_), `cg_drawCrosshairNames` (_"Show Crosshair Target Name"_ f.k.a. "Identify Target") and `cg_drawTeamOverlay` (_"Show Team Overlay"_).
* New options: `cg_crosshairPulse` (_"Crosshair Pickup Pulse"_), `cg_draw3DIcons` (_"Weapon Bar Icon Rendering"_ in _"2D"_ or _"3D"_), `cg_weaponBarStyle` (_"Weapon Bar Style"_), `cg_obituaryOutput` (_"Death Messages"_), `cg_drawTimer` (_"Show Timer"_), `cg_drawStatus` (_"Show Match Status"_), `cg_drawAmmoWarning` (_"Show Low Ammo Warning"_), `cg_drawAttacker` (_"Show Last Attacker"_), `cg_drawSpeed` (_"Show Movement Speed"_) and `cg_drawRewards` (_"Show Medal(s) Earned"_).
* New options: `cg_crosshairPulse` (_"Crosshair Pickup Pulse"_), `cg_draw3DIcons` (_"Weapon Bar Icon Rendering"_ in _"2D"_ or _"3D"_), `cg_weaponBarStyle` (_"Weapon Bar Style"_), `cg_obituaryOutput` (_"Death Messages"_), `cg_drawTimer` (_"Show Timer"_), `cg_drawStatus` (_"Show Player Status"_), `cg_drawAmmoWarning` (_"Show Low Ammo Warning"_), `cg_drawAttacker` (_"Show Last Attacker"_), `cg_drawSpeed` (_"Show Movement Speed"_) and `cg_drawRewards` (_"Show Medal(s) Earned"_).
* Game Options:
* Options transplanted to many menus as mentioned above and below.
* New options: `cg_drawGun` (_"Weapon Hand"_: _"Hidden"_, _"Left"_, _"Right"_, _"Center"_), `cg_muzzleFlashStyle` (_"Muzzle Flash Style"_), `com_blood` (_"Show Blood"_), `cg_gibs` (_"Show Gibs"_), `cg_bob` (_"View Bobbing"_), `cg_bobModel` (_"Weapon Bobbing"_), `cg_railTrailTime` (_"Railgun Slug Trail Time"_) and `cg_kickScale` (_"Screen Shaking Rate"_).
Expand All @@ -71,6 +71,7 @@
* Transplanted from Game Options: `cl_allowDownload` (_"Download From Servers"_, f.k.a. "Autodownload") and `cg_delag` (_"Delag Hitscan Latency"_ f.k.a. "Unlag Hitscan").
* Sound:
* Transplanted from Game Options: `cl_chatBeep` (_"Beep on Chat"_) and `cg_teamChatBeep` (_"Beep on Team Chat"_).
* New option: `cg_hitSound` (_"Enable Hitsound"_).
* Video:
* Transplanted from Game Options: `r_dynamicLight` (_"Dynamic Lights"_).
* Find Servers:
Expand Down Expand Up @@ -215,15 +216,17 @@
* New H.U.D. menu, accessible from Setup, controls the elements that are displayed in, well, the HUD, including the crosshair and weapon bar. Among the new options added and not mentioned later in this changelog:
* Transplanted from Video: `cg_drawFPS` (_"Draw FPS"_).
* Transplanted from Game Options: `cg_drawCrosshair` (_"Crosshair Style"_), `cg_crosshairHealth` (_"Crosshair Shows Health"_), `cg_crosshairColorRed` (_"Crosshair Color (Red)"_), `cg_crosshairColorGreen` (_"Crosshair Color (Green)"_), `cg_crosshairColorBlue` (_"Crosshair Color (Blue)"_), `cg_alwaysWeaponBar` (_"Always Show Weapon Bar"_), `cg_drawCrosshairNames` (_"Show Crosshair Target Name"_ f.k.a. "Identify Target") and `cg_drawTeamOverlay` (_"Show Team Overlay"_).
* New options: `cg_crosshairPulse` (_"Crosshair Pickup Pulse"_), `cg_draw3DIcons` (_"Weapon Bar Icon Rendering"_ in _"2D"_ or _"3D"_), `cg_weaponBarStyle` (_"Weapon Bar Style"_), `cg_obituaryOutput` (_"Death Messages"_), `cg_drawTimer` (_"Show Timer"_), `cg_drawStatus` (_"Show Match Status"_), `cg_drawAmmoWarning` (_"Show Low Ammo Warning"_), `cg_drawAttacker` (_"Show Last Attacker"_), `cg_drawSpeed` (_"Show Movement Speed"_) and `cg_drawRewards` (_"Show Medal(s) Earned"_).
* New options: `cg_crosshairPulse` (_"Crosshair Pickup Pulse"_), `cg_draw3DIcons` (_"Weapon Bar Icon Rendering"_ in _"2D"_ or _"3D"_), `cg_weaponBarStyle` (_"Weapon Bar Style"_), `cg_obituaryOutput` (_"Death Messages"_), `cg_drawTimer` (_"Show Timer"_), `cg_drawStatus` (_"Show Player Status"_), `cg_drawAmmoWarning` (_"Show Low Ammo Warning"_), `cg_drawAttacker` (_"Show Last Attacker"_), `cg_drawSpeed` (_"Show Movement Speed"_) and `cg_drawRewards` (_"Show Medal(s) Earned"_).
* Game Options:
* Options transplanted to many menus as mentioned above and below.
* Adjusted item positioning.
* New options: `cg_drawGun` (_"Weapon Hand"_: _"Hidden"_, _"Left"_, _"Right"_, _"Center"_), `cg_muzzleFlashStyle` (_"Muzzle Flash Style"_), `com_blood` (_"Show Blood"_), `cg_gibs` (_"Show Gibs"_), `cg_bob` (_"View Bobbing"_), `cg_bobModel` (_"Weapon Bobbing"_), `cg_railTrailTime` (_"Railgun Slug Trail Time"_) and `cg_kickScale` (_"Screen Shaking Rate"_).
* Renamed "Simple Items" to _"In-Game Pickup Rendering"_ (with 2D and 3D options).
* Network:
* Transplanted from Game Options: `cl_allowDownload` (_"Download From Servers"_, f.k.a. "Autodownload") and `cg_delag` (_"Delag Hitscan Latency"_ f.k.a. "Unlag Hitscan").
* Sound:
* Transplanted from Game Options: `cl_chatBeep` (_"Beep on Chat"_) and `cg_teamChatBeep` (_"Beep on Team Chat"_).
* New option: `cg_hitSound` (_"Enable Hitsound"_).
* Video:
* Transplanted from Game Options: `r_dynamicLight` (_"Dynamic Lights"_).
* Find Servers:
Expand Down
24 changes: 3 additions & 21 deletions code/q3_ui/ui_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ DISPLAY OPTIONS MENU
#define ID_DISPLAY 11
#define ID_SOUND 12
#define ID_NETWORK 13
#define ID_HUD 14
#define ID_BRIGHTNESS 15
#define ID_SCREENSIZE 16
#define ID_BACK 17
#define ID_BRIGHTNESS 14
#define ID_SCREENSIZE 15
#define ID_BACK 16


typedef struct {
Expand All @@ -57,7 +56,6 @@ typedef struct {
menutext_s display;
menutext_s sound;
menutext_s network;
menutext_s hud;

menuslider_s brightness;
menuslider_s screensize;
Expand Down Expand Up @@ -97,11 +95,6 @@ static void UI_DisplayOptionsMenu_Event( void* ptr, int event ) {
UI_NetworkOptionsMenu();
break;

case ID_HUD:
UI_PopMenu();
UI_HUDOptionsMenu();
break;

case ID_BRIGHTNESS:
trap_Cvar_SetValue( "r_gamma", displayOptionsInfo.brightness.curvalue / 10.0f );
break;
Expand Down Expand Up @@ -195,16 +188,6 @@ static void UI_DisplayOptionsMenu_Init( void ) {
displayOptionsInfo.network.style = UI_RIGHT;
displayOptionsInfo.network.color = color_red;

displayOptionsInfo.hud.generic.type = MTYPE_PTEXT;
displayOptionsInfo.hud.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
displayOptionsInfo.hud.generic.id = ID_HUD;
displayOptionsInfo.hud.generic.callback = UI_DisplayOptionsMenu_Event;
displayOptionsInfo.hud.generic.x = 216;
displayOptionsInfo.hud.generic.y = 240 + PROP_HEIGHT;
displayOptionsInfo.hud.string = "H.U.D.";
displayOptionsInfo.hud.style = UI_RIGHT;
displayOptionsInfo.hud.color = color_red;

y = 240 - 1 * (BIGCHAR_HEIGHT+2);
displayOptionsInfo.brightness.generic.type = MTYPE_SLIDER;
displayOptionsInfo.brightness.generic.name = "Brightness:";
Expand Down Expand Up @@ -248,7 +231,6 @@ static void UI_DisplayOptionsMenu_Init( void ) {
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.display );
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.sound );
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.network );
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.hud );
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.brightness );
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.screensize );
Menu_AddItem( &displayOptionsInfo.menu, ( void * ) &displayOptionsInfo.back );
Expand Down
Loading

0 comments on commit bce9989

Please sign in to comment.