Skip to content

Commit

Permalink
Added (all games): CVar "menu-hotkeys" 1= Enable hotkey navigation in…
Browse files Browse the repository at this point in the history
… the menu. Enabled by default.
  • Loading branch information
danij committed Feb 9, 2009
1 parent c378a13 commit 3bbad8e
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -1199,9 +1199,8 @@ static menu_t ColorWidgetMnu = {
#endif
};

// Cvars for the menu
cvar_t menuCVars[] =
{
// Cvars for the menu:
cvar_t menuCVars[] = {
{"menu-scale", 0, CVT_FLOAT, &cfg.menuScale, .1f, 1},
{"menu-flash-r", 0, CVT_FLOAT, &cfg.flashColor[0], 0, 1},
{"menu-flash-g", 0, CVT_FLOAT, &cfg.flashColor[1], 0, 1},
Expand All @@ -1221,13 +1220,14 @@ cvar_t menuCVars[] =
{"menu-patch-replacement", 0, CVT_BYTE, &cfg.usePatchReplacement, 0, 2},
{"menu-slam", 0, CVT_BYTE, &cfg.menuSlam, 0, 1},
{"menu-quick-ask", 0, CVT_BYTE, &cfg.askQuickSaveLoad, 0, 1},
{"menu-hotkeys", 0, CVT_BYTE, &cfg.menuHotkeys, 0, 1},
#if __JDOOM__ || __JDOOM64__
{"menu-quitsound", 0, CVT_INT, &cfg.menuQuitSound, 0, 1},
#endif
{NULL}
};

// Console commands for the menu
// Console commands for the menu:
ccmd_t menuCCmds[] = {
{"menu", "", CCmdMenuAction},
{"menuup", "", CCmdMenuAction},
Expand Down Expand Up @@ -2241,9 +2241,9 @@ boolean Hu_MenuResponder(event_t* ev)
* The first ASCII character of a menu item's text string is used
* as a "hotkey" shortcut to allow navigating directly to that item.
*/
if(ev->type == EV_KEY &&
(ev->state == EVS_DOWN || ev->state == EVS_REPEAT) &&
!(menu->flags & MNF_NOHOTKEYS))
if(cfg.menuHotkeys && !(menu->flags & MNF_NOHOTKEYS) &&
ev->type == EV_KEY &&
(ev->state == EVS_DOWN || ev->state == EVS_REPEAT))
{
int i, first, last; // First and last, visible menu items.
int cand = toupper(ev->data1);
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jdoom/data/conhelp.txt
Expand Up @@ -258,6 +258,9 @@ desc = Strength of type-in glitter.
[menu-fog]
desc = Menu fog mode: 0=off, 1=shimmer, 2=black smoke, 3=blue vertical, 4=grey smoke, 5=dimmed.

[menu-hotkeys]
desc = 1=Enable hotkey navigation in the menu.

[menu-shadow]
desc = Menu text shadow darkness.

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom/include/d_config.h
Expand Up @@ -91,6 +91,7 @@ typedef struct jdoom_config_s {
float menuShadow;
int menuQuitSound;
byte menuSlam;
byte menuHotkeys;
byte askQuickSaveLoad;
float flashColor[3];
int flashSpeed;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom/src/d_main.c
Expand Up @@ -425,6 +425,7 @@ void G_PreInit(void)
cfg.menuColor[0] = 1;
cfg.menuColor2[0] = 1;
cfg.menuSlam = false;
cfg.menuHotkeys = true;
cfg.askQuickSaveLoad = true;

cfg.maxSkulls = true;
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jdoom64/data/conhelp.txt
Expand Up @@ -254,6 +254,9 @@ desc = Strength of type-in glitter.
[menu-fog]
desc = Menu fog mode: 0=off, 1=shimmer, 2=black smoke, 3=blue vertical, 4=grey smoke, 5=dimmed.

[menu-hotkeys]
desc = 1=Enable hotkey navigation in the menu.

[menu-shadow]
desc = Menu text shadow darkness.

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom64/include/d_config.h
Expand Up @@ -92,6 +92,7 @@ typedef struct jdoom64_config_s {
float menuShadow;
int menuQuitSound;
byte menuSlam;
byte menuHotkeys;
byte askQuickSaveLoad;
float flashColor[3];
int flashSpeed;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom64/src/d_main.c
Expand Up @@ -308,6 +308,7 @@ void G_PreInit(void)
cfg.menuColor[0] = 1;
cfg.menuColor2[0] = 1;
cfg.menuSlam = false;
cfg.menuHotkeys = true;
cfg.askQuickSaveLoad = true;

cfg.maxSkulls = true;
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jheretic/data/conhelp.txt
Expand Up @@ -270,6 +270,9 @@ desc = Strength of type-in glitter.
[menu-fog]
desc = Menu fog mode: 0=off, 1=shimmer, 2=black smoke, 3=blue vertical, 4=grey smoke, 5=dimmed.

[menu-hotkeys]
desc = 1=Enable hotkey navigation in the menu.

[menu-shadow]
desc = Menu text shadow darkness.

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/include/h_config.h
Expand Up @@ -90,6 +90,7 @@ typedef struct jheretic_config_s {
float menuShadow;

byte menuSlam;
byte menuHotkeys;
byte askQuickSaveLoad;
float flashColor[3];
int flashSpeed;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/src/h_main.c
Expand Up @@ -321,6 +321,7 @@ void G_PreInit(void)
cfg.menuColor2[1] = defFontRGB2[1];
cfg.menuColor2[2] = defFontRGB2[2];
cfg.menuSlam = true;
cfg.menuHotkeys = true;
cfg.askQuickSaveLoad = true;

cfg.monstersStuckInDoors = false;
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jhexen/data/conhelp.txt
Expand Up @@ -282,6 +282,9 @@ desc = Strength of type-in glitter.
[menu-fog]
desc = Menu fog mode: 0=off, 1=shimmer, 2=black smoke, 3=blue vertical, 4=grey smoke, 5=dimmed.

[menu-hotkeys]
desc = 1=Enable hotkey navigation in the menu.

[menu-shadow]
desc = Menu text shadow darkness.

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jhexen/include/x_config.h
Expand Up @@ -162,6 +162,7 @@ typedef struct {
float menuColor[3];
float menuColor2[3];
byte menuSlam;
byte menuHotkeys;

byte netMap, netClass, netColor, netSkill;
byte netEpisode; // Unused in Hexen.
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jhexen/src/h2_main.c
Expand Up @@ -282,6 +282,7 @@ void G_PreInit(void)
cfg.menuColor2[1] = defFontRGB2[1];
cfg.menuColor2[2] = defFontRGB2[2];
cfg.menuEffects = 0;
cfg.menuHotkeys = true;
cfg.hudFog = 5;
cfg.menuSlam = true;
cfg.flashColor[0] = 1.0f;
Expand Down

0 comments on commit 3bbad8e

Please sign in to comment.