diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b40daf..d8014b67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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"_). @@ -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: @@ -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: diff --git a/code/q3_ui/ui_display.c b/code/q3_ui/ui_display.c index a088c7ca..7ee188fc 100644 --- a/code/q3_ui/ui_display.c +++ b/code/q3_ui/ui_display.c @@ -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 { @@ -57,7 +56,6 @@ typedef struct { menutext_s display; menutext_s sound; menutext_s network; - menutext_s hud; menuslider_s brightness; menuslider_s screensize; @@ -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; @@ -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:"; @@ -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 ); diff --git a/code/q3_ui/ui_hud.c b/code/q3_ui/ui_hud.c index bc463b6c..7e1b7bce 100644 --- a/code/q3_ui/ui_hud.c +++ b/code/q3_ui/ui_hud.c @@ -37,7 +37,7 @@ GAME OPTIONS MENU #define ART_BACK0 "menu/" MENU_ART_DIR "/back_0" #define ART_BACK1 "menu/" MENU_ART_DIR "/back_1" -#define HUDOPTIONS_X_POS 360 +#define HUDOPTIONS_X_POS 320 #define ID_BACK 127 #define ID_CROSSHAIR 128 @@ -414,8 +414,8 @@ Descriptions should have 48 characters or less per line, and there can't be more ================= */ static void HUDOptions_StatusBar_DrawStatus( void* ptr ) { - UI_DrawString( 320, 440, "If set, draws the status of the match", UI_CENTER|UI_SMALLFONT, colorWhite ); - UI_DrawString( 320, 460, "on the bottom-right corner, next to your bar.", UI_CENTER|UI_SMALLFONT, colorWhite ); + UI_DrawString( 320, 440, "If set, draws ammo, health and armor status", UI_CENTER|UI_SMALLFONT, colorWhite ); + UI_DrawString( 320, 460, "on the bottom of your screen.", UI_CENTER|UI_SMALLFONT, colorWhite ); } /* @@ -548,7 +548,7 @@ static void HUDOptions_MenuInit( void ) { hudOptions_s.banner.generic.type = MTYPE_BTEXT; hudOptions_s.banner.generic.x = 320; hudOptions_s.banner.generic.y = 16; - hudOptions_s.banner.string = "HEADS-UP DISPLAY (H.U.D.)"; + hudOptions_s.banner.string = "HEADS UP DISPLAY"; hudOptions_s.banner.color = color_white; hudOptions_s.banner.style = UI_CENTER; @@ -568,11 +568,11 @@ static void HUDOptions_MenuInit( void ) { hudOptions_s.framer.width = 256; hudOptions_s.framer.height = 334; - y = 80; + //y = 80; hudOptions_s.crosshair.generic.type = MTYPE_TEXT; hudOptions_s.crosshair.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT|QMF_NODEFAULTINIT|QMF_OWNERDRAW; hudOptions_s.crosshair.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.crosshair.generic.y = y; + hudOptions_s.crosshair.generic.y = 240 - 9 * (BIGCHAR_HEIGHT+2); hudOptions_s.crosshair.generic.name = "Crosshair Style:"; hudOptions_s.crosshair.generic.callback = HUDOptions_Event; hudOptions_s.crosshair.generic.ownerdraw = Crosshair_Draw; @@ -583,58 +583,58 @@ static void HUDOptions_MenuInit( void ) { hudOptions_s.crosshair.generic.right = HUDOPTIONS_X_POS + 48; hudOptions_s.crosshair.generic.statusbar = HUDOptions_StatusBar_Crosshair; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.crosshairHealth.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.crosshairHealth.generic.name = "Crosshair Shows Health:"; hudOptions_s.crosshairHealth.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.crosshairHealth.generic.callback = HUDOptions_Event; hudOptions_s.crosshairHealth.generic.id = ID_CROSSHAIRHEALTH; hudOptions_s.crosshairHealth.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.crosshairHealth.generic.y = y; + hudOptions_s.crosshairHealth.generic.y = 240 - 8 * (BIGCHAR_HEIGHT+2); hudOptions_s.crosshairHealth.generic.statusbar = HUDOptions_StatusBar_CrosshairHealth; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.crosshairPulse.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.crosshairPulse.generic.name = "Crosshair Pickup Pulse:"; hudOptions_s.crosshairPulse.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.crosshairPulse.generic.callback = HUDOptions_Event; hudOptions_s.crosshairPulse.generic.id = ID_CROSSHAIRPULSE; hudOptions_s.crosshairPulse.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.crosshairPulse.generic.y = y; + hudOptions_s.crosshairPulse.generic.y = 240 - 7 * (BIGCHAR_HEIGHT+2); hudOptions_s.crosshairPulse.generic.statusbar = HUDOptions_StatusBar_CrosshairPulse; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.crosshairColorRed.generic.type = MTYPE_SLIDER; hudOptions_s.crosshairColorRed.generic.name = "Crosshair Color (Red):"; hudOptions_s.crosshairColorRed.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.crosshairColorRed.generic.callback = HUDOptions_Event; hudOptions_s.crosshairColorRed.generic.id = ID_COLORRED; hudOptions_s.crosshairColorRed.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.crosshairColorRed.generic.y = y; + hudOptions_s.crosshairColorRed.generic.y = 240 - 6 * (BIGCHAR_HEIGHT+2); hudOptions_s.crosshairColorRed.minvalue = 0.0f; hudOptions_s.crosshairColorRed.maxvalue = 255.0f; hudOptions_s.crosshairColorRed.generic.statusbar = HUDOptions_StatusBar_CrosshairColor; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.crosshairColorGreen.generic.type = MTYPE_SLIDER; hudOptions_s.crosshairColorGreen.generic.name = "Crosshair Color (Green):"; hudOptions_s.crosshairColorGreen.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.crosshairColorGreen.generic.callback = HUDOptions_Event; hudOptions_s.crosshairColorGreen.generic.id = ID_COLORGREEN; hudOptions_s.crosshairColorGreen.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.crosshairColorGreen.generic.y = y; + hudOptions_s.crosshairColorGreen.generic.y = 240 - 5 * (BIGCHAR_HEIGHT+2); hudOptions_s.crosshairColorGreen.minvalue = 0.0f; hudOptions_s.crosshairColorGreen.maxvalue = 255.0f; hudOptions_s.crosshairColorGreen.generic.statusbar = HUDOptions_StatusBar_CrosshairColor; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.crosshairColorBlue.generic.type = MTYPE_SLIDER; hudOptions_s.crosshairColorBlue.generic.name = "Crosshair Color (Blue):"; hudOptions_s.crosshairColorBlue.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.crosshairColorBlue.generic.callback = HUDOptions_Event; hudOptions_s.crosshairColorBlue.generic.id = ID_COLORBLUE; hudOptions_s.crosshairColorBlue.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.crosshairColorBlue.generic.y = y; + hudOptions_s.crosshairColorBlue.generic.y = 240 - 4 * (BIGCHAR_HEIGHT+2); hudOptions_s.crosshairColorBlue.minvalue = 0.0f; hudOptions_s.crosshairColorBlue.maxvalue = 255.0f; hudOptions_s.crosshairColorBlue.generic.statusbar = HUDOptions_StatusBar_CrosshairColor; @@ -645,138 +645,138 @@ static void HUDOptions_MenuInit( void ) { hudOptions_s.crosshairColorBlue.generic.flags |= QMF_INACTIVE; } - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.draw3DIcons.generic.type = MTYPE_SPINCONTROL; hudOptions_s.draw3DIcons.generic.name = "Weapon Bar Icon Rendering:"; hudOptions_s.draw3DIcons.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.draw3DIcons.generic.callback = HUDOptions_Event; hudOptions_s.draw3DIcons.generic.id = ID_DRAW3DICONS; hudOptions_s.draw3DIcons.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.draw3DIcons.generic.y = y; + hudOptions_s.draw3DIcons.generic.y = 240 - 3 * (BIGCHAR_HEIGHT+2); hudOptions_s.draw3DIcons.itemnames = draw3DIcons_names; hudOptions_s.draw3DIcons.generic.statusbar = HUDOptions_StatusBar_Draw3DIcons; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.alwaysWeaponBar.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.alwaysWeaponBar.generic.name = "Always Show Weapon Bar:"; hudOptions_s.alwaysWeaponBar.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.alwaysWeaponBar.generic.callback = HUDOptions_Event; hudOptions_s.alwaysWeaponBar.generic.id = ID_ALWAYSWEAPONBAR; hudOptions_s.alwaysWeaponBar.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.alwaysWeaponBar.generic.y = y; + hudOptions_s.alwaysWeaponBar.generic.y = 240 - 2 * (BIGCHAR_HEIGHT+2); hudOptions_s.alwaysWeaponBar.generic.statusbar = HUDOptions_StatusBar_AlwaysWeaponBar; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.weaponBarStyle.generic.type = MTYPE_SPINCONTROL; hudOptions_s.weaponBarStyle.generic.name = "Weapon Bar Style:"; hudOptions_s.weaponBarStyle.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.weaponBarStyle.generic.callback = HUDOptions_Event; hudOptions_s.weaponBarStyle.generic.id = ID_WEAPONBARSTYLE; hudOptions_s.weaponBarStyle.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.weaponBarStyle.generic.y = y; + hudOptions_s.weaponBarStyle.generic.y = 240 - (BIGCHAR_HEIGHT+2); hudOptions_s.weaponBarStyle.itemnames = weaponBarStyle_names; hudOptions_s.weaponBarStyle.generic.statusbar = HUDOptions_StatusBar_WeaponBarStyle; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.identifyTarget.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.identifyTarget.generic.name = "Show Crosshair Target Name:"; hudOptions_s.identifyTarget.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.identifyTarget.generic.callback = HUDOptions_Event; hudOptions_s.identifyTarget.generic.id = ID_IDENTIFYTARGET; hudOptions_s.identifyTarget.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.identifyTarget.generic.y = y; + hudOptions_s.identifyTarget.generic.y = 240; hudOptions_s.identifyTarget.generic.statusbar = HUDOptions_StatusBar_IdentifyTarget; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawTeamOverlay.generic.type = MTYPE_SPINCONTROL; hudOptions_s.drawTeamOverlay.generic.name = "Show Team Overlay:"; hudOptions_s.drawTeamOverlay.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawTeamOverlay.generic.callback = HUDOptions_Event; hudOptions_s.drawTeamOverlay.generic.id = ID_DRAWTEAMOVERLAY; hudOptions_s.drawTeamOverlay.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawTeamOverlay.generic.y = y; + hudOptions_s.drawTeamOverlay.generic.y = 240 + (BIGCHAR_HEIGHT+2); hudOptions_s.drawTeamOverlay.itemnames = teamOverlay_names; hudOptions_s.drawTeamOverlay.generic.statusbar = HUDOptions_StatusBar_DrawTeamOverlay; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.obituaryOutput.generic.type = MTYPE_SPINCONTROL; hudOptions_s.obituaryOutput.generic.name = "Death Message Output:"; hudOptions_s.obituaryOutput.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.obituaryOutput.generic.callback = HUDOptions_Event; hudOptions_s.obituaryOutput.generic.id = ID_OBITUARYOUTPUT; hudOptions_s.obituaryOutput.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.obituaryOutput.generic.y = y; + hudOptions_s.obituaryOutput.generic.y = 240 + 2 * (BIGCHAR_HEIGHT+2); hudOptions_s.obituaryOutput.itemnames = obituaryOutput_names; hudOptions_s.obituaryOutput.generic.statusbar = HUDOptions_StatusBar_ObituaryOutput; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawFPS.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.drawFPS.generic.name = "Show FPS:"; hudOptions_s.drawFPS.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawFPS.generic.callback = HUDOptions_Event; hudOptions_s.drawFPS.generic.id = ID_DRAWFPS; hudOptions_s.drawFPS.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawFPS.generic.y = y; + hudOptions_s.drawFPS.generic.y = 240 + 3 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawFPS.generic.statusbar = HUDOptions_StatusBar_DrawFPS; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawTimer.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.drawTimer.generic.name = "Show Timer:"; hudOptions_s.drawTimer.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawTimer.generic.callback = HUDOptions_Event; hudOptions_s.drawTimer.generic.id = ID_DRAWTIMER; hudOptions_s.drawTimer.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawTimer.generic.y = y; + hudOptions_s.drawTimer.generic.y = 240 + 4 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawTimer.generic.statusbar = HUDOptions_StatusBar_DrawTimer; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawStatus.generic.type = MTYPE_RADIOBUTTON; - hudOptions_s.drawStatus.generic.name = "Show Match Status:"; + hudOptions_s.drawStatus.generic.name = "Show Player Status:"; hudOptions_s.drawStatus.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawStatus.generic.callback = HUDOptions_Event; hudOptions_s.drawStatus.generic.id = ID_DRAWSTATUS; hudOptions_s.drawStatus.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawStatus.generic.y = y; + hudOptions_s.drawStatus.generic.y = 240 + 5 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawStatus.generic.statusbar = HUDOptions_StatusBar_DrawStatus; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawAmmoWarning.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.drawAmmoWarning.generic.name = "Show Low Ammo Warning:"; hudOptions_s.drawAmmoWarning.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawAmmoWarning.generic.callback = HUDOptions_Event; hudOptions_s.drawAmmoWarning.generic.id = ID_DRAWAMMOWARNING; hudOptions_s.drawAmmoWarning.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawAmmoWarning.generic.y = y; + hudOptions_s.drawAmmoWarning.generic.y = 240 + 6 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawAmmoWarning.generic.statusbar = HUDOptions_StatusBar_DrawAmmoWarning; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawAttacker.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.drawAttacker.generic.name = "Show Last Attacker:"; hudOptions_s.drawAttacker.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawAttacker.generic.callback = HUDOptions_Event; hudOptions_s.drawAttacker.generic.id = ID_DRAWATTACKER; hudOptions_s.drawAttacker.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawAttacker.generic.y = y; + hudOptions_s.drawAttacker.generic.y = 240 + 7 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawAttacker.generic.statusbar = HUDOptions_StatusBar_DrawAttacker; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawSpeed.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.drawSpeed.generic.name = "Show Movement Speed:"; hudOptions_s.drawSpeed.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawSpeed.generic.callback = HUDOptions_Event; hudOptions_s.drawSpeed.generic.id = ID_DRAWSPEED; hudOptions_s.drawSpeed.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawSpeed.generic.y = y; + hudOptions_s.drawSpeed.generic.y = 240 + 8 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawSpeed.generic.statusbar = HUDOptions_StatusBar_DrawSpeed; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; hudOptions_s.drawRewards.generic.type = MTYPE_RADIOBUTTON; hudOptions_s.drawRewards.generic.name = "Show Medal(s) Earned:"; hudOptions_s.drawRewards.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; hudOptions_s.drawRewards.generic.callback = HUDOptions_Event; hudOptions_s.drawRewards.generic.id = ID_DRAWREWARDS; hudOptions_s.drawRewards.generic.x = HUDOPTIONS_X_POS; - hudOptions_s.drawRewards.generic.y = y; + hudOptions_s.drawRewards.generic.y = 240 + 9 * (BIGCHAR_HEIGHT+2); hudOptions_s.drawRewards.generic.statusbar = HUDOptions_StatusBar_DrawRewards; hudOptions_s.back.generic.type = MTYPE_BITMAP; diff --git a/code/q3_ui/ui_network.c b/code/q3_ui/ui_network.c index 8e3923d8..eb485f15 100644 --- a/code/q3_ui/ui_network.c +++ b/code/q3_ui/ui_network.c @@ -40,12 +40,11 @@ NETWORK OPTIONS MENU #define ID_DISPLAY 11 #define ID_SOUND 12 #define ID_NETWORK 13 -#define ID_HUD 14 -#define ID_RATE 15 -#define ID_ALLOWDOWNLOAD 16 -#define ID_DELAG 17 -#define ID_LAGOMETER 18 -#define ID_BACK 19 +#define ID_RATE 14 +#define ID_ALLOWDOWNLOAD 15 +#define ID_DELAG 16 +#define ID_LAGOMETER 17 +#define ID_BACK 18 const char *rate_items[] = { @@ -68,7 +67,6 @@ typedef struct { menutext_s display; menutext_s sound; menutext_s network; - menutext_s hud; menulist_s rate; menuradiobutton_s allowdownload; @@ -110,11 +108,6 @@ static void UI_NetworkOptionsMenu_Event( void* ptr, int event ) { case ID_NETWORK: break; - case ID_HUD: - UI_PopMenu(); - UI_HUDOptionsMenu(); - break; - case ID_RATE: if( networkOptionsInfo.rate.curvalue == 0 ) { trap_Cvar_SetValue( "rate", 2500 ); @@ -233,52 +226,42 @@ static void UI_NetworkOptionsMenu_Init( void ) { networkOptionsInfo.network.style = UI_RIGHT; networkOptionsInfo.network.color = color_red; - networkOptionsInfo.hud.generic.type = MTYPE_PTEXT; - networkOptionsInfo.hud.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; - networkOptionsInfo.hud.generic.id = ID_HUD; - networkOptionsInfo.hud.generic.callback = UI_NetworkOptionsMenu_Event; - networkOptionsInfo.hud.generic.x = 216; - networkOptionsInfo.hud.generic.y = 240; - networkOptionsInfo.hud.string = "H.U.D."; - networkOptionsInfo.hud.style = UI_RIGHT; - networkOptionsInfo.hud.color = color_red; - - y = 240 - 1 * (BIGCHAR_HEIGHT+2); + //y = 240 - 1 * (BIGCHAR_HEIGHT+2); networkOptionsInfo.rate.generic.type = MTYPE_SPINCONTROL; networkOptionsInfo.rate.generic.name = "Network Speed:"; networkOptionsInfo.rate.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; networkOptionsInfo.rate.generic.callback = UI_NetworkOptionsMenu_Event; networkOptionsInfo.rate.generic.id = ID_RATE; networkOptionsInfo.rate.generic.x = 400; - networkOptionsInfo.rate.generic.y = y; + networkOptionsInfo.rate.generic.y = 240 - 1.5 * (BIGCHAR_HEIGHT + 2); networkOptionsInfo.rate.itemnames = rate_items; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; networkOptionsInfo.allowdownload.generic.type = MTYPE_RADIOBUTTON; networkOptionsInfo.allowdownload.generic.name = "Download From Servers:"; networkOptionsInfo.allowdownload.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; networkOptionsInfo.allowdownload.generic.callback = UI_NetworkOptionsMenu_Event; networkOptionsInfo.allowdownload.generic.id = ID_ALLOWDOWNLOAD; networkOptionsInfo.allowdownload.generic.x = 400; - networkOptionsInfo.allowdownload.generic.y = y; + networkOptionsInfo.allowdownload.generic.y = 240 - 0.5 * (BIGCHAR_HEIGHT + 2); - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; networkOptionsInfo.delag.generic.type = MTYPE_RADIOBUTTON; networkOptionsInfo.delag.generic.name = "Delag Hitscan Latency:"; networkOptionsInfo.delag.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; networkOptionsInfo.delag.generic.callback = UI_NetworkOptionsMenu_Event; networkOptionsInfo.delag.generic.id = ID_DELAG; networkOptionsInfo.delag.generic.x = 400; - networkOptionsInfo.delag.generic.y = y; + networkOptionsInfo.delag.generic.y = 240 + 0.5 * (BIGCHAR_HEIGHT + 2); - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; networkOptionsInfo.lagometer.generic.type = MTYPE_RADIOBUTTON; networkOptionsInfo.lagometer.generic.name = "Lagometer:"; networkOptionsInfo.lagometer.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; networkOptionsInfo.lagometer.generic.callback = UI_NetworkOptionsMenu_Event; networkOptionsInfo.lagometer.generic.id = ID_LAGOMETER; networkOptionsInfo.lagometer.generic.x = 400; - networkOptionsInfo.lagometer.generic.y = y; + networkOptionsInfo.lagometer.generic.y = 240 + 1.5 * (BIGCHAR_HEIGHT + 2); networkOptionsInfo.back.generic.type = MTYPE_BITMAP; networkOptionsInfo.back.generic.name = ART_BACK0; @@ -298,7 +281,6 @@ static void UI_NetworkOptionsMenu_Init( void ) { Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.display ); Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.sound ); Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.network ); - Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.hud ); Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.rate ); Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.allowdownload ); Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.delag ); diff --git a/code/q3_ui/ui_preferences.c b/code/q3_ui/ui_preferences.c index 044b9b45..6821478d 100644 --- a/code/q3_ui/ui_preferences.c +++ b/code/q3_ui/ui_preferences.c @@ -37,7 +37,7 @@ GAME OPTIONS MENU #define ART_BACK0 "menu/" MENU_ART_DIR "/back_0" #define ART_BACK1 "menu/" MENU_ART_DIR "/back_1" -#define PREFERENCES_X_POS 360 +#define PREFERENCES_X_POS 320 #define ID_BACK 127 #define ID_DRAWGUN 128 @@ -170,6 +170,8 @@ static void Preferences_SetMenuItems( void ) { else { // default value s_preferences.weaponBob.curvalue = 0; } + Q_strncpyz( s_preferences.railTrailTime.field.buffer, UI_Cvar_VariableString( "cg_railTrailTime" ), sizeof( s_preferences.railTrailTime.field.buffer ) ); + Q_strncpyz( s_preferences.kickScale.field.buffer, UI_Cvar_VariableString( "cg_kickScale" ), sizeof( s_preferences.kickScale.field.buffer ) ); } static void Preferences_Event( void* ptr, int notification ) { @@ -486,150 +488,150 @@ static void Preferences_MenuInit( void ) { s_preferences.framer.width = 256; s_preferences.framer.height = 334; - y = 96; + //y = 128; s_preferences.drawGun.generic.type = MTYPE_SPINCONTROL; s_preferences.drawGun.generic.name = "Weapon Hand:"; s_preferences.drawGun.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.drawGun.generic.callback = Preferences_Event; s_preferences.drawGun.generic.id = ID_DRAWGUN; s_preferences.drawGun.generic.x = PREFERENCES_X_POS; - s_preferences.drawGun.generic.y = y; + s_preferences.drawGun.generic.y = 240 - 6.5 * (BIGCHAR_HEIGHT+2); s_preferences.drawGun.itemnames = drawGun_names; s_preferences.drawGun.generic.statusbar = Preferences_StatusBar_WeaponHand; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.simpleitems.generic.type = MTYPE_SPINCONTROL; s_preferences.simpleitems.generic.name = "In-Game Pickup Rendering:"; s_preferences.simpleitems.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.simpleitems.generic.callback = Preferences_Event; s_preferences.simpleitems.generic.id = ID_SIMPLEITEMS; s_preferences.simpleitems.generic.x = PREFERENCES_X_POS; - s_preferences.simpleitems.generic.y = y; + s_preferences.simpleitems.generic.y = 240 - 5.5 * (BIGCHAR_HEIGHT+2); s_preferences.simpleitems.itemnames = simpleItems_names; s_preferences.simpleitems.generic.statusbar = Preferences_StatusBar_SimpleItems; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.wallmarks.generic.type = MTYPE_RADIOBUTTON; s_preferences.wallmarks.generic.name = "Show Marks on Walls:"; s_preferences.wallmarks.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.wallmarks.generic.callback = Preferences_Event; s_preferences.wallmarks.generic.id = ID_WALLMARKS; s_preferences.wallmarks.generic.x = PREFERENCES_X_POS; - s_preferences.wallmarks.generic.y = y; + s_preferences.wallmarks.generic.y = 240 - 4.5 * (BIGCHAR_HEIGHT+2); s_preferences.wallmarks.generic.statusbar = Preferences_StatusBar_MarksOnWalls; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.brass.generic.type = MTYPE_RADIOBUTTON; s_preferences.brass.generic.name = "Show Ejecting Brass:"; s_preferences.brass.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.brass.generic.callback = Preferences_Event; s_preferences.brass.generic.id = ID_EJECTINGBRASS; s_preferences.brass.generic.x = PREFERENCES_X_POS; - s_preferences.brass.generic.y = y; + s_preferences.brass.generic.y = 240 - 3.5 * (BIGCHAR_HEIGHT+2); s_preferences.brass.generic.statusbar = Preferences_StatusBar_EjectingBrass; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.highqualitysky.generic.type = MTYPE_RADIOBUTTON; s_preferences.highqualitysky.generic.name = "Show High Quality Sky:"; s_preferences.highqualitysky.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.highqualitysky.generic.callback = Preferences_Event; s_preferences.highqualitysky.generic.id = ID_HIGHQUALITYSKY; s_preferences.highqualitysky.generic.x = PREFERENCES_X_POS; - s_preferences.highqualitysky.generic.y = y; + s_preferences.highqualitysky.generic.y = 240 - 2.5 * (BIGCHAR_HEIGHT+2); s_preferences.highqualitysky.generic.statusbar = Preferences_StatusBar_HighQualitySky; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.synceveryframe.generic.type = MTYPE_RADIOBUTTON; s_preferences.synceveryframe.generic.name = "Sync Every Frame:"; s_preferences.synceveryframe.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.synceveryframe.generic.callback = Preferences_Event; s_preferences.synceveryframe.generic.id = ID_SYNCEVERYFRAME; s_preferences.synceveryframe.generic.x = PREFERENCES_X_POS; - s_preferences.synceveryframe.generic.y = y; + s_preferences.synceveryframe.generic.y = 240 - 1.5 * (BIGCHAR_HEIGHT+2); s_preferences.synceveryframe.generic.statusbar = Preferences_StatusBar_SyncEveryFrame; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.forcemodel.generic.type = MTYPE_RADIOBUTTON; s_preferences.forcemodel.generic.name = "Force Player Models:"; s_preferences.forcemodel.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.forcemodel.generic.callback = Preferences_Event; s_preferences.forcemodel.generic.id = ID_FORCEMODEL; s_preferences.forcemodel.generic.x = PREFERENCES_X_POS; - s_preferences.forcemodel.generic.y = y; + s_preferences.forcemodel.generic.y = 240 - 0.5 * (BIGCHAR_HEIGHT+2); s_preferences.forcemodel.generic.statusbar = Preferences_StatusBar_ForceModels; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.muzzleFlashStyle.generic.type = MTYPE_SPINCONTROL; s_preferences.muzzleFlashStyle.generic.name = "Muzzle Flash Style:"; s_preferences.muzzleFlashStyle.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.muzzleFlashStyle.generic.callback = Preferences_Event; s_preferences.muzzleFlashStyle.generic.id = ID_MUZZLEFLASHSTYLE; s_preferences.muzzleFlashStyle.generic.x = PREFERENCES_X_POS; - s_preferences.muzzleFlashStyle.generic.y = y; + s_preferences.muzzleFlashStyle.generic.y = 240 + 0.5 * (BIGCHAR_HEIGHT+2); s_preferences.muzzleFlashStyle.itemnames = muzzleFlashStyle_names; s_preferences.muzzleFlashStyle.generic.statusbar = Preferences_StatusBar_MuzzleFlashStyle; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.showBlood.generic.type = MTYPE_RADIOBUTTON; s_preferences.showBlood.generic.name = "Enable Blood:"; s_preferences.showBlood.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.showBlood.generic.callback = Preferences_Event; s_preferences.showBlood.generic.id = ID_SHOWBLOOD; s_preferences.showBlood.generic.x = PREFERENCES_X_POS; - s_preferences.showBlood.generic.y = y; + s_preferences.showBlood.generic.y = 240 + 1.5 * (BIGCHAR_HEIGHT+2); s_preferences.showBlood.generic.statusbar = Preferences_StatusBar_ShowBlood; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.showGibs.generic.type = MTYPE_RADIOBUTTON; s_preferences.showGibs.generic.name = "Enable Gibs:"; s_preferences.showGibs.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.showGibs.generic.callback = Preferences_Event; s_preferences.showGibs.generic.id = ID_SHOWGIBS; s_preferences.showGibs.generic.x = PREFERENCES_X_POS; - s_preferences.showGibs.generic.y = y; + s_preferences.showGibs.generic.y = 240 + 2.5 * (BIGCHAR_HEIGHT+2); s_preferences.showGibs.generic.statusbar = Preferences_StatusBar_ShowGibs; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.viewBob.generic.type = MTYPE_SPINCONTROL; s_preferences.viewBob.generic.name = "View Bobbing:"; s_preferences.viewBob.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.viewBob.generic.callback = Preferences_Event; s_preferences.viewBob.generic.id = ID_VIEWBOB; s_preferences.viewBob.generic.x = PREFERENCES_X_POS; - s_preferences.viewBob.generic.y = y; + s_preferences.viewBob.generic.y = 240 + 3.5 * (BIGCHAR_HEIGHT+2); s_preferences.viewBob.itemnames = viewBob_names; s_preferences.viewBob.generic.statusbar = Preferences_StatusBar_ViewBobbing; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.weaponBob.generic.type = MTYPE_SPINCONTROL; s_preferences.weaponBob.generic.name = "Weapon Bobbing:"; s_preferences.weaponBob.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.weaponBob.generic.callback = Preferences_Event; s_preferences.weaponBob.generic.id = ID_VIEWBOB; s_preferences.weaponBob.generic.x = PREFERENCES_X_POS; - s_preferences.weaponBob.generic.y = y; + s_preferences.weaponBob.generic.y = 240 + 4.5 * (BIGCHAR_HEIGHT+2); s_preferences.weaponBob.itemnames = weaponBob_names; s_preferences.weaponBob.generic.statusbar = Preferences_StatusBar_WeaponBobbing; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.railTrailTime.generic.type = MTYPE_FIELD; s_preferences.railTrailTime.generic.name = "Railgun Slug Trail Time:"; s_preferences.railTrailTime.generic.flags = QMF_SMALLFONT; s_preferences.railTrailTime.generic.id = ID_RAILTRAILTIME; - s_preferences.railTrailTime.generic.x = 192; - s_preferences.railTrailTime.generic.y = y; + s_preferences.railTrailTime.generic.x = PREFERENCES_X_POS; + s_preferences.railTrailTime.generic.y = 240 + 5.5 * (BIGCHAR_HEIGHT+2); s_preferences.railTrailTime.field.widthInChars = 6; s_preferences.railTrailTime.field.maxchars = 6; s_preferences.railTrailTime.generic.callback = Preferences_Event; s_preferences.railTrailTime.generic.statusbar = Preferences_StatusBar_RailTrailTime; - y += BIGCHAR_HEIGHT; + //y += BIGCHAR_HEIGHT+2; s_preferences.kickScale.generic.type = MTYPE_FIELD; s_preferences.kickScale.generic.name = "Screen Shaking Rate:"; s_preferences.kickScale.generic.flags = QMF_SMALLFONT; s_preferences.kickScale.generic.id = ID_KICKSCALE; - s_preferences.kickScale.generic.x = 192; - s_preferences.kickScale.generic.y = y; + s_preferences.kickScale.generic.x = PREFERENCES_X_POS; + s_preferences.kickScale.generic.y = 240 + 6.5 * (BIGCHAR_HEIGHT+2); s_preferences.kickScale.field.widthInChars = 6; s_preferences.kickScale.field.maxchars = 6; s_preferences.kickScale.generic.callback = Preferences_Event; diff --git a/code/q3_ui/ui_sound.c b/code/q3_ui/ui_sound.c index 1769aa79..87ee98bc 100644 --- a/code/q3_ui/ui_sound.c +++ b/code/q3_ui/ui_sound.c @@ -40,16 +40,16 @@ SOUND OPTIONS MENU #define ID_DISPLAY 11 #define ID_SOUND 12 #define ID_NETWORK 13 -#define ID_HUD 14 -#define ID_EFFECTSVOLUME 15 -#define ID_MUSICVOLUME 16 -#define ID_QUALITY 17 +#define ID_EFFECTSVOLUME 14 +#define ID_MUSICVOLUME 15 +#define ID_QUALITY 16 //#define ID_A3D 17 //Sago: Here I do some stuff! -#define ID_OPENAL 18 -#define ID_BACK 19 -#define ID_CHATBEEP 20 -#define ID_TEAMCHATBEEP 21 +#define ID_OPENAL 17 +#define ID_BACK 18 +#define ID_CHATBEEP 19 +#define ID_TEAMCHATBEEP 20 +#define ID_HITSOUND 21 static const char *quality_items[] = { @@ -67,7 +67,6 @@ typedef struct { menutext_s display; menutext_s sound; menutext_s network; - menutext_s hud; menuslider_s sfxvolume; menuslider_s musicvolume; @@ -76,6 +75,7 @@ typedef struct { menuradiobutton_s openal; menuradiobutton_s chatBeep; menuradiobutton_s teamChatBeep; + menuradiobutton_s hitSound; menubitmap_s back; } soundOptionsInfo_t; @@ -112,11 +112,6 @@ static void UI_SoundOptionsMenu_Event( void* ptr, int event ) { UI_NetworkOptionsMenu(); break; - case ID_HUD: - UI_PopMenu(); - UI_HUDOptionsMenu(); - break; - case ID_EFFECTSVOLUME: trap_Cvar_SetValue( "s_volume", soundOptionsInfo.sfxvolume.curvalue / 10 ); break; @@ -167,6 +162,10 @@ static void UI_SoundOptionsMenu_Event( void* ptr, int event ) { trap_Cvar_SetValue( "cg_teamChatBeep", soundOptionsInfo.teamChatBeep.curvalue ); break; + case ID_HITSOUND: + trap_Cvar_SetValue( "cg_hitSound", soundOptionsInfo.hitSound.curvalue ); + break; + case ID_BACK: UI_PopMenu(); break; @@ -252,46 +251,36 @@ static void UI_SoundOptionsMenu_Init( void ) { soundOptionsInfo.network.style = UI_RIGHT; soundOptionsInfo.network.color = color_red; - soundOptionsInfo.hud.generic.type = MTYPE_PTEXT; - soundOptionsInfo.hud.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; - soundOptionsInfo.hud.generic.id = ID_HUD; - soundOptionsInfo.hud.generic.callback = UI_SoundOptionsMenu_Event; - soundOptionsInfo.hud.generic.x = 216; - soundOptionsInfo.hud.generic.y = 240 + PROP_HEIGHT; - soundOptionsInfo.hud.string = "H.U.D."; - soundOptionsInfo.hud.style = UI_RIGHT; - soundOptionsInfo.hud.color = color_red; - - y = 240 - 1.5 * (BIGCHAR_HEIGHT + 2); + //y = 240 - 3 * (BIGCHAR_HEIGHT + 2); soundOptionsInfo.sfxvolume.generic.type = MTYPE_SLIDER; soundOptionsInfo.sfxvolume.generic.name = "Effects Volume:"; soundOptionsInfo.sfxvolume.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; soundOptionsInfo.sfxvolume.generic.callback = UI_SoundOptionsMenu_Event; soundOptionsInfo.sfxvolume.generic.id = ID_EFFECTSVOLUME; soundOptionsInfo.sfxvolume.generic.x = 400; - soundOptionsInfo.sfxvolume.generic.y = y; + soundOptionsInfo.sfxvolume.generic.y = 240 - 3 * (BIGCHAR_HEIGHT + 2); soundOptionsInfo.sfxvolume.minvalue = 0; soundOptionsInfo.sfxvolume.maxvalue = 10; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; soundOptionsInfo.musicvolume.generic.type = MTYPE_SLIDER; soundOptionsInfo.musicvolume.generic.name = "Music Volume:"; soundOptionsInfo.musicvolume.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; soundOptionsInfo.musicvolume.generic.callback = UI_SoundOptionsMenu_Event; soundOptionsInfo.musicvolume.generic.id = ID_MUSICVOLUME; soundOptionsInfo.musicvolume.generic.x = 400; - soundOptionsInfo.musicvolume.generic.y = y; + soundOptionsInfo.musicvolume.generic.y = 240 - 2 * (BIGCHAR_HEIGHT + 2); soundOptionsInfo.musicvolume.minvalue = 0; soundOptionsInfo.musicvolume.maxvalue = 10; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; soundOptionsInfo.quality.generic.type = MTYPE_SPINCONTROL; soundOptionsInfo.quality.generic.name = "Sound Quality:"; soundOptionsInfo.quality.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; soundOptionsInfo.quality.generic.callback = UI_SoundOptionsMenu_Event; soundOptionsInfo.quality.generic.id = ID_QUALITY; soundOptionsInfo.quality.generic.x = 400; - soundOptionsInfo.quality.generic.y = y; + soundOptionsInfo.quality.generic.y = 240 - (BIGCHAR_HEIGHT + 2); soundOptionsInfo.quality.itemnames = quality_items; /* y += BIGCHAR_HEIGHT+2; @@ -303,32 +292,41 @@ static void UI_SoundOptionsMenu_Init( void ) { soundOptionsInfo.a3d.generic.x = 400; soundOptionsInfo.a3d.generic.y = y; */ - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; soundOptionsInfo.openal.generic.type = MTYPE_RADIOBUTTON; soundOptionsInfo.openal.generic.name = "OpenAL:"; soundOptionsInfo.openal.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; soundOptionsInfo.openal.generic.callback = UI_SoundOptionsMenu_Event; soundOptionsInfo.openal.generic.id = ID_OPENAL; soundOptionsInfo.openal.generic.x = 400; - soundOptionsInfo.openal.generic.y = y; + soundOptionsInfo.openal.generic.y = 240; - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; soundOptionsInfo.chatBeep.generic.type = MTYPE_RADIOBUTTON; soundOptionsInfo.chatBeep.generic.name = "Beep on Chat:"; soundOptionsInfo.chatBeep.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; soundOptionsInfo.chatBeep.generic.callback = UI_SoundOptionsMenu_Event; soundOptionsInfo.chatBeep.generic.id = ID_CHATBEEP; soundOptionsInfo.chatBeep.generic.x = 400; - soundOptionsInfo.chatBeep.generic.y = y; + soundOptionsInfo.chatBeep.generic.y = 240 + (BIGCHAR_HEIGHT + 2); - y += BIGCHAR_HEIGHT+2; + //y += BIGCHAR_HEIGHT+2; soundOptionsInfo.teamChatBeep.generic.type = MTYPE_RADIOBUTTON; soundOptionsInfo.teamChatBeep.generic.name = "Beep on Team Chat:"; soundOptionsInfo.teamChatBeep.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; soundOptionsInfo.teamChatBeep.generic.callback = UI_SoundOptionsMenu_Event; soundOptionsInfo.teamChatBeep.generic.id = ID_TEAMCHATBEEP; soundOptionsInfo.teamChatBeep.generic.x = 400; - soundOptionsInfo.teamChatBeep.generic.y = y; + soundOptionsInfo.teamChatBeep.generic.y = 240 + 2 * (BIGCHAR_HEIGHT + 2); + + //y += BIGCHAR_HEIGHT+2; + soundOptionsInfo.hitSound.generic.type = MTYPE_RADIOBUTTON; + soundOptionsInfo.hitSound.generic.name = "Enable Hitsound:"; + soundOptionsInfo.hitSound.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; + soundOptionsInfo.hitSound.generic.callback = UI_SoundOptionsMenu_Event; + soundOptionsInfo.hitSound.generic.id = ID_HITSOUND; + soundOptionsInfo.hitSound.generic.x = 400; + soundOptionsInfo.hitSound.generic.y = 240 + 3 * (BIGCHAR_HEIGHT + 2); soundOptionsInfo.back.generic.type = MTYPE_BITMAP; soundOptionsInfo.back.generic.name = ART_BACK0; @@ -348,7 +346,6 @@ static void UI_SoundOptionsMenu_Init( void ) { Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.display ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.sound ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.network ); - Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.hud ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.sfxvolume ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.musicvolume ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.quality ); @@ -356,6 +353,7 @@ static void UI_SoundOptionsMenu_Init( void ) { Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.openal ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.chatBeep ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.teamChatBeep ); + Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.hitSound ); Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.back ); soundOptionsInfo.sfxvolume.curvalue = trap_Cvar_VariableValue( "s_volume" ) * 10; @@ -365,6 +363,7 @@ static void UI_SoundOptionsMenu_Init( void ) { soundOptionsInfo.openal.curvalue = (int)trap_Cvar_VariableValue( "s_useopenal" ); soundOptionsInfo.chatBeep.curvalue = (int)trap_Cvar_VariableValue( "cg_chatBeep" ); soundOptionsInfo.teamChatBeep.curvalue = (int)trap_Cvar_VariableValue( "cg_teamChatBeep" ); + soundOptionsInfo.hitSound.curvalue = (int)trap_Cvar_VariableValue( "cg_hitSound" ); } diff --git a/code/q3_ui/ui_video.c b/code/q3_ui/ui_video.c index 598e6738..08c4a328 100644 --- a/code/q3_ui/ui_video.c +++ b/code/q3_ui/ui_video.c @@ -247,8 +247,7 @@ GRAPHICS OPTIONS MENU #define ID_DISPLAY 107 #define ID_SOUND 108 #define ID_NETWORK 109 -#define ID_HUD 110 -#define ID_RATIO 111 +#define ID_RATIO 110 typedef struct { menuframework_s menu; @@ -261,7 +260,6 @@ typedef struct { menutext_s display; menutext_s sound; menutext_s network; - menutext_s hud; menulist_s list; menulist_s ratio; @@ -829,11 +827,6 @@ static void GraphicsOptions_Event( void* ptr, int event ) { UI_PopMenu(); UI_NetworkOptionsMenu(); break; - - case ID_HUD: - UI_PopMenu(); - UI_HUDOptionsMenu(); - break; } } @@ -1110,16 +1103,6 @@ void GraphicsOptions_MenuInit( void ) s_graphicsoptions.network.style = UI_RIGHT; s_graphicsoptions.network.color = color_red; - s_graphicsoptions.hud.generic.type = MTYPE_PTEXT; - s_graphicsoptions.hud.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; - s_graphicsoptions.hud.generic.id = ID_HUD; - s_graphicsoptions.hud.generic.callback = GraphicsOptions_Event; - s_graphicsoptions.hud.generic.x = 216; - s_graphicsoptions.hud.generic.y = 240 + PROP_HEIGHT; - s_graphicsoptions.hud.string = "H.U.D"; - s_graphicsoptions.hud.style = UI_RIGHT; - s_graphicsoptions.hud.color = color_red; - y = 240 - 7 * (BIGCHAR_HEIGHT + 2); s_graphicsoptions.list.generic.type = MTYPE_SPINCONTROL; s_graphicsoptions.list.generic.name = "Graphics Settings:"; @@ -1302,7 +1285,6 @@ void GraphicsOptions_MenuInit( void ) Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.display ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.sound ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.network ); - Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.hud ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.list ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driver );