mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 13:21:20 +00:00
Menu navigation improvements for gamepads.
This commit is contained in:
parent
650e0eafce
commit
50b3bf54ef
1 changed files with 17 additions and 9 deletions
26
src/m_menu.c
26
src/m_menu.c
|
@ -2095,13 +2095,16 @@ boolean M_Responder(event_t *ev)
|
|||
case KEY_JOY1 + 2:
|
||||
ch = KEY_ENTER;
|
||||
break;
|
||||
case KEY_JOY1 + 3:
|
||||
ch = 'n';
|
||||
case KEY_JOY1 + 7:
|
||||
ch = KEY_ESCAPE;
|
||||
break;
|
||||
case KEY_MOUSE1 + 1:
|
||||
case KEY_JOY1 + 1:
|
||||
ch = KEY_BACKSPACE;
|
||||
break;
|
||||
case KEY_JOY1 + 3:
|
||||
ch = KEY_DEL;
|
||||
break;
|
||||
case KEY_HAT1:
|
||||
ch = KEY_UPARROW;
|
||||
break;
|
||||
|
@ -2424,9 +2427,10 @@ boolean M_Responder(event_t *ev)
|
|||
return true;
|
||||
}
|
||||
// Why _does_ backspace go back anyway?
|
||||
//currentMenu->lastOn = itemOn;
|
||||
//if (currentMenu->prevMenu)
|
||||
// M_SetupNextMenu(currentMenu->prevMenu);
|
||||
//Why doesn't it?
|
||||
currentMenu->lastOn = itemOn;
|
||||
if (currentMenu->prevMenu)
|
||||
M_SetupNextMenu(currentMenu->prevMenu);
|
||||
return false;
|
||||
|
||||
default:
|
||||
|
@ -4721,7 +4725,7 @@ static void M_HandleLoadSave(INT32 choice)
|
|||
exitmenu = true;
|
||||
break;
|
||||
|
||||
case KEY_BACKSPACE:
|
||||
case KEY_DEL:
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
// Don't allow people to 'delete' "Play without Saving."
|
||||
// Nor allow people to 'delete' slots with no saves in them.
|
||||
|
@ -6332,11 +6336,13 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
break;
|
||||
|
||||
case KEY_BACKSPACE:
|
||||
if ((l = strlen(setupm_ip))!=0 && itemOn == 0)
|
||||
if ((l = strlen(setupm_ip)) != 0 && itemOn == 0)
|
||||
{
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_ip[l-1] =0;
|
||||
S_StartSound(NULL, sfx_menu1); // Tails
|
||||
setupm_ip[l - 1] = 0;
|
||||
}
|
||||
else
|
||||
exitmenu = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -6537,6 +6543,8 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_name[l-1] =0;
|
||||
}
|
||||
else
|
||||
exitmenu = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue