diff --git a/source/menu/menu_aces.qc b/source/menu/menu_aces.qc index eee5556..a126f02 100644 --- a/source/menu/menu_aces.qc +++ b/source/menu/menu_aces.qc @@ -1,8 +1,9 @@ -string menu_accesibility_buttons[4] = {"ac_hitm", "ac_text", "ac_apply", "ac_back"}; +string menu_accesibility_buttons[5] = {"ac_hitm", "ac_text", "ac_nukefla", "ac_apply", "ac_back"}; float menu_accessibility_init; float current_hitmarker; +float current_nukeflash; string(string prev_id) Menu_Accessibility_GetNextButton = { @@ -47,6 +48,7 @@ string(string next_id) Menu_Accessibility_GetPreviousButton = void() Menu_Accessibility_StoreCurrentSettings = { current_hitmarker = cvar("cl_hitmarkers"); + current_nukeflash = cvar("cl_nukeflashcolor"); } void() Menu_Accessibility_ApplySettings = @@ -68,6 +70,13 @@ void() Menu_Accessibility_UpdateHitmarkers = cvar_set("cl_hitmarkers", ftos(current_hitmarker)); }; +void() Menu_Accessibility_UpdateNukeFlash = +{ + Menu_PlaySound(MENU_SND_ENTER); + current_nukeflash = !current_nukeflash; + cvar_set("cl_nukeflashcolor", ftos(current_nukeflash)); +}; + void() Menu_Accessibility = { if (!menu_accessibility_init) @@ -90,6 +99,16 @@ void() Menu_Accessibility = Menu_Button(2, "ac_text", "TEXT BACKDROP", "Opacity of backdrop for text elements on HUD.") ? 0 : 0; Menu_CvarSlider(2, [0, 1, 20], "cl_textopacity", false, false); + // Nuke flash color + Menu_Button(3, "ac_nukefla", "NUKE FLASH COLOR", "Adjust the color of the nuke flash for better visibility.") ? Menu_Accessibility_UpdateNukeFlash() : 0; + string nukeflash_string = ""; + switch(current_nukeflash) { + case 0: nukeflash_string = "WHITE"; break; + case 1: nukeflash_string = "BLACK"; break; + default: break; + } + Menu_DrawOptionValue(3, nukeflash_string); + Menu_DrawDivider(12.25); Menu_Button(-2, "ac_apply", "APPLY", "Save & Apply Settings.") ? Menu_Accessibility_ApplySettings() : 0; Menu_Button(-1, "ac_back", "BACK", "Return to Configuration Menu.") ? current_menu = MENU_OPTIONS : 0; diff --git a/source/menu/menu_ctrl.qc b/source/menu/menu_ctrl.qc index 9fef7aa..cc5d683 100644 --- a/source/menu/menu_ctrl.qc +++ b/source/menu/menu_ctrl.qc @@ -18,7 +18,6 @@ void() Menu_Control_StoreCurrentSettings = } current_invert = (cvar("m_pitch") == 0.022); - current_sprintoggle = (cvar("togglesprint") == 1); }; void() Menu_Control_Init = @@ -55,17 +54,6 @@ void() Menu_Control_InvertLook = localcmd("m_pitch -0.022\n"); }; -void() Menu_Control_ToggleSprint = -{ - Menu_PlaySound(MENU_SND_ENTER); - current_sprintoggle = !current_sprintoggle; - - if (current_sprintoggle) - localcmd("togglesprint 1\n"); - else - localcmd("togglesprint 0\n"); -}; - void() Menu_Control_ApplySettings = { localcmd("vid_reload\nsaveconfig user_settings.cfg\n"); @@ -142,17 +130,8 @@ void() Menu_Control = } Menu_DrawOptionValue(3, invert_string); - Menu_Button(4, "cm_togsp", "TOGGLE SPRINT", "Toggle sprinting on press, or hold to sprint.") ? Menu_Control_ToggleSprint() : 0; - string sprintoggle_string = ""; - switch(current_sprintoggle) { - case 0: sprintoggle_string = "HOLD"; break; - case 1: sprintoggle_string = "TOGGLE"; break; - default: break; - } - Menu_DrawOptionValue(4, sprintoggle_string); - - Menu_Button(5, "cm_gpad", "GAMEPAD", "Gamepad specific options.") ? current_menu = MENU_GAMEPAD : 0; - Menu_Button(6, "cm_bind", "BINDINGS", "Change Input Bindings.") ? current_menu = MENU_BINDINGS : 0; + Menu_Button(4, "cm_gpad", "GAMEPAD", "Gamepad specific options.") ? current_menu = MENU_GAMEPAD : 0; + Menu_Button(5, "cm_bind", "BINDINGS", "Change Input Bindings.") ? current_menu = MENU_BINDINGS : 0; Menu_DrawDivider(12.25); Menu_Button(-2, "cm_apply", "APPLY", "Save & Apply Settings.") ? Menu_Control_ApplySettings() : 0;