Add gc_screenshot and gc_recordgif from Kart

This commit is contained in:
mazmazz 2018-12-03 11:31:48 -05:00
parent 8e190932e7
commit 2a87093ece
4 changed files with 8 additions and 2 deletions

View file

@ -1190,6 +1190,8 @@ void G_Controldefault(void)
gamecontrol[gc_jump ][0] = KEY_SPACE;
gamecontrol[gc_console ][0] = KEY_CONSOLE;
gamecontrol[gc_pause ][0] = 'p';
gamecontrol[gc_screenshot ][0] = KEY_F8;
gamecontrol[gc_recordgif ][0] = KEY_F9;
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+7; // Start
#ifdef WMINPUT
gamecontrol[gc_forward ][0] = KEY_JOY1+02; //UP

View file

@ -119,6 +119,8 @@ typedef enum
gc_console,
gc_pause,
gc_systemmenu,
gc_screenshot,
gc_recordgif,
gc_custom1, // Lua scriptable
gc_custom2, // Lua scriptable
gc_custom3, // Lua scriptable

View file

@ -1073,6 +1073,8 @@ static menuitem_t OP_MiscControlsMenu[] =
{IT_CALL | IT_STRING2, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 },
{IT_CALL | IT_STRING2, NULL, "Pause", M_ChangeControl, gc_pause },
{IT_CALL | IT_STRING2, NULL, "Screenshot", M_ChangeControl, gc_screenshot },
{IT_CALL | IT_STRING2, NULL, "Toggle GIF Recording", M_ChangeControl, gc_recordgif },
{IT_CALL | IT_STRING2, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu },
{IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, gc_console },
};

View file

@ -1494,9 +1494,9 @@ boolean M_ScreenshotResponder(event_t *ev)
return false;
ch = ev->data1;
if (ch == KEY_F8)
if (ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8
M_ScreenShot();
else if (ch == KEY_F9)
else if (ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9
((moviemode) ? M_StopMovie : M_StartMovie)();
else
return false;