Skip to content

Commit

Permalink
Add language option to Game menu (for 2021 re-release)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Sep 8, 2024
1 parent 44684f5 commit abb2e35
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Quake/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ cvar_t ui_sound_throttle = {"ui_sound_throttle", "0.1", CVAR_ARCHIVE};
cvar_t ui_search_timeout = {"ui_search_timeout", "1", CVAR_ARCHIVE};

extern cvar_t crosshair;
extern cvar_t language;
extern cvar_t scr_fov;
extern cvar_t cl_gun_fovscale;
extern cvar_t v_gunkick;
Expand Down Expand Up @@ -3318,6 +3319,8 @@ void M_Menu_Gamepad_f (void)
item (OPT_LOOKSTRAFE, "Look Strafe") \
item (OPT_LOOKSPRING, "Look Spring") \
item (SPACER, "") \
item (OPT_LANGUAGE, "Language") \
item (SPACER, "") \
item (OPT_MUSICEXT, "External Music") \
item (OPT_WATERSNDFX, "Water Muffling") \
end_menu () \
Expand Down Expand Up @@ -3853,6 +3856,10 @@ void M_AdjustSliders (int dir)
Cvar_SetValueQuick (&lookspring, !lookspring.value);
break;

case OPT_LANGUAGE:
Cbuf_AddText (va ("cycle%s language auto english french german italian spanish\n", dir > 0 ? "" : "back"));
break;

case OPT_CONFIRMQUIT:
M_CycleCvar (&cl_confirmquit, 0, 2, dir);
break;
Expand Down Expand Up @@ -4320,6 +4327,10 @@ static void M_Options_DrawItem (int y, int item)
M_DrawCheckbox (x, y, cl_startdemos.value);
break;

case OPT_LANGUAGE:
M_Print (x, y, language.string);
break;

case OPT_GAMMA:
r = (1.0 - vid_gamma.value) / 0.5;
M_DrawSlider (x, y, r, va ("%.0f", 10.f * r));
Expand Down

0 comments on commit abb2e35

Please sign in to comment.