mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Key handler to allow selecting map by arrow keys in Record Attack
Enter still goes to the platter.
This commit is contained in:
parent
bc9f9d740a
commit
233ea2d07a
1 changed files with 33 additions and 1 deletions
34
src/m_menu.c
34
src/m_menu.c
|
|
@ -247,6 +247,7 @@ menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef;
|
||||||
// Single Player
|
// Single Player
|
||||||
static void M_StartTutorial(INT32 choice);
|
static void M_StartTutorial(INT32 choice);
|
||||||
static void M_LoadGame(INT32 choice);
|
static void M_LoadGame(INT32 choice);
|
||||||
|
static void M_HandleTimeAttackLevelSelect(INT32 choice);
|
||||||
static void M_TimeAttackLevelSelect(INT32 choice);
|
static void M_TimeAttackLevelSelect(INT32 choice);
|
||||||
static void M_TimeAttack(INT32 choice);
|
static void M_TimeAttack(INT32 choice);
|
||||||
static void M_NightsAttackLevelSelect(INT32 choice);
|
static void M_NightsAttackLevelSelect(INT32 choice);
|
||||||
|
|
@ -743,7 +744,7 @@ static menuitem_t SP_TimeAttackLevelSelectMenu[] =
|
||||||
// Single Player Time Attack
|
// Single Player Time Attack
|
||||||
static menuitem_t SP_TimeAttackMenu[] =
|
static menuitem_t SP_TimeAttackMenu[] =
|
||||||
{
|
{
|
||||||
{IT_STRING|IT_CALL, NULL, "Level Select...", &M_TimeAttackLevelSelect, 52},
|
{IT_STRING|IT_KEYHANDLER, NULL, "Level Select...", M_HandleTimeAttackLevelSelect, 52},
|
||||||
{IT_STRING|IT_CVAR, NULL, "Character", &cv_chooseskin, 62},
|
{IT_STRING|IT_CVAR, NULL, "Character", &cv_chooseskin, 62},
|
||||||
|
|
||||||
{IT_DISABLED, NULL, "Guest Option...", &SP_GuestReplayDef, 100},
|
{IT_DISABLED, NULL, "Guest Option...", &SP_GuestReplayDef, 100},
|
||||||
|
|
@ -8400,6 +8401,37 @@ void M_DrawTimeAttackMenu(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void M_HandleTimeAttackLevelSelect(INT32 choice)
|
||||||
|
{
|
||||||
|
switch (choice)
|
||||||
|
{
|
||||||
|
case KEY_DOWNARROW:
|
||||||
|
M_NextOpt();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KEY_UPARROW:
|
||||||
|
M_PrevOpt();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KEY_LEFTARROW:
|
||||||
|
CV_AddValue(&cv_nextmap, -1);
|
||||||
|
break;
|
||||||
|
case KEY_RIGHTARROW:
|
||||||
|
CV_AddValue(&cv_nextmap, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KEY_ENTER:
|
||||||
|
M_TimeAttackLevelSelect(0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KEY_ESCAPE:
|
||||||
|
noFurtherInput = true;
|
||||||
|
M_GoBack(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
S_StartSound(NULL, sfx_menu1);
|
||||||
|
}
|
||||||
|
|
||||||
static void M_TimeAttackLevelSelect(INT32 choice)
|
static void M_TimeAttackLevelSelect(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)choice;
|
(void)choice;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue