mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 21:31:32 +00:00
Add support for overriding the ESC key
This commit is contained in:
parent
6886a29e99
commit
72d80a9aa8
3 changed files with 7 additions and 0 deletions
|
@ -990,6 +990,7 @@ static const char *gamecontrolname[num_gamecontrols] =
|
|||
"jump",
|
||||
"console",
|
||||
"pause",
|
||||
"systemmenu",
|
||||
"custom1",
|
||||
"custom2",
|
||||
"custom3",
|
||||
|
|
|
@ -118,6 +118,7 @@ typedef enum
|
|||
gc_jump,
|
||||
gc_console,
|
||||
gc_pause,
|
||||
gc_systemmenu,
|
||||
gc_custom1, // Lua scriptable
|
||||
gc_custom2, // Lua scriptable
|
||||
gc_custom3, // Lua scriptable
|
||||
|
|
|
@ -1077,6 +1077,8 @@ static menuitem_t OP_MiscControlsMenu[] =
|
|||
{IT_CALL | IT_STRING2, NULL, "Custom Action 2", M_ChangeControl, gc_custom2 },
|
||||
{IT_CALL | IT_STRING2, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 },
|
||||
|
||||
{IT_CALL | IT_STRING2, NULL, "System Menu (ESC)",M_ChangeControl, gc_systemmenu },
|
||||
|
||||
{IT_CALL | IT_STRING2, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, gc_console },
|
||||
};
|
||||
|
@ -2176,11 +2178,14 @@ boolean M_Responder(event_t *ev)
|
|||
|
||||
if (ch == -1)
|
||||
return false;
|
||||
else if (ch == gamecontrol[gc_systemmenu][0]) // allow remappable ESC key
|
||||
ch = KEY_ESCAPE;
|
||||
|
||||
// F-Keys
|
||||
if (!menuactive)
|
||||
{
|
||||
noFurtherInput = true;
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case KEY_F1: // Help key
|
||||
|
|
Loading…
Reference in a new issue