mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
COnfirm box now respects rebindable accelerate and brake on keyboards
This commit is contained in:
parent
eb81bea943
commit
7c5740d98f
1 changed files with 28 additions and 25 deletions
|
@ -1980,9 +1980,11 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room)
|
|||
|
||||
#endif // ifndef NONET
|
||||
|
||||
static void M_ConfirmConnect(INT32 ch)
|
||||
static void M_ConfirmConnect(event_t *ev)
|
||||
{
|
||||
if (ch == ' ' || ch == 'y' || ch == KEY_ENTER)
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[gc_accelerate][0] || ev->data1 == gamecontrol[gc_accelerate][1])
|
||||
{
|
||||
if (totalfilesrequestednum > 0)
|
||||
{
|
||||
|
@ -2005,11 +2007,12 @@ static void M_ConfirmConnect(INT32 ch)
|
|||
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
else if (ch == 'n' || ch == KEY_ESCAPE)
|
||||
else if (ev->data1 == 'n' || ev->data1 == KEY_ESCAPE|| ev->data1 == gamecontrol[gc_brake][0] || ev->data1 == gamecontrol[gc_brake][1])
|
||||
{
|
||||
cl_mode = CL_ABORTED;
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static boolean CL_FinishedFileList(void)
|
||||
|
@ -2060,7 +2063,7 @@ static boolean CL_FinishedFileList(void)
|
|||
"You may load server addons (if any), and wait for a slot.\n"
|
||||
"\n"
|
||||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), M_ConfirmConnect, MM_YESNO);
|
||||
), M_ConfirmConnect, MM_EVENTHANDLER);
|
||||
cl_mode = CL_CONFIRMCONNECT;
|
||||
}
|
||||
else
|
||||
|
@ -2120,13 +2123,13 @@ static boolean CL_FinishedFileList(void)
|
|||
"You may download, load server addons, and wait for a slot.\n"
|
||||
"\n"
|
||||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), downloadsize), M_ConfirmConnect, MM_YESNO);
|
||||
), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER);
|
||||
else
|
||||
M_StartMessage(va(M_GetText(
|
||||
"Download of %s additional content is required to join.\n"
|
||||
"\n"
|
||||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), downloadsize), M_ConfirmConnect, MM_YESNO);
|
||||
), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER);
|
||||
|
||||
Z_Free(downloadsize);
|
||||
cl_mode = CL_CONFIRMCONNECT;
|
||||
|
|
Loading…
Reference in a new issue