Make the second page of cups accessible by up/down input at the limit, rather than left/right input

This commit is contained in:
toaster 2022-11-17 18:30:55 +00:00
parent 372854f8d3
commit f01bb3e793

View file

@ -3528,12 +3528,7 @@ void M_CupSelectHandler(INT32 choice)
{ {
cupgrid.x++; cupgrid.x++;
if (cupgrid.x >= CUPMENU_COLUMNS) if (cupgrid.x >= CUPMENU_COLUMNS)
{
cupgrid.x = 0; cupgrid.x = 0;
cupgrid.pageno++;
if (cupgrid.pageno >= cupgrid.numpages)
cupgrid.pageno = 0;
}
S_StartSound(NULL, sfx_s3k5b); S_StartSound(NULL, sfx_s3k5b);
M_SetMenuDelay(pid); M_SetMenuDelay(pid);
} }
@ -3541,12 +3536,7 @@ void M_CupSelectHandler(INT32 choice)
{ {
cupgrid.x--; cupgrid.x--;
if (cupgrid.x < 0) if (cupgrid.x < 0)
{
cupgrid.x = CUPMENU_COLUMNS-1; cupgrid.x = CUPMENU_COLUMNS-1;
cupgrid.pageno--;
if (cupgrid.pageno < 0)
cupgrid.pageno = cupgrid.numpages-1;
}
S_StartSound(NULL, sfx_s3k5b); S_StartSound(NULL, sfx_s3k5b);
M_SetMenuDelay(pid); M_SetMenuDelay(pid);
} }
@ -3555,7 +3545,12 @@ void M_CupSelectHandler(INT32 choice)
{ {
cupgrid.y++; cupgrid.y++;
if (cupgrid.y >= CUPMENU_ROWS) if (cupgrid.y >= CUPMENU_ROWS)
{
cupgrid.y = 0; cupgrid.y = 0;
cupgrid.pageno--;
if (cupgrid.pageno < 0)
cupgrid.pageno = cupgrid.numpages-1;
}
S_StartSound(NULL, sfx_s3k5b); S_StartSound(NULL, sfx_s3k5b);
M_SetMenuDelay(pid); M_SetMenuDelay(pid);
} }
@ -3563,7 +3558,12 @@ void M_CupSelectHandler(INT32 choice)
{ {
cupgrid.y--; cupgrid.y--;
if (cupgrid.y < 0) if (cupgrid.y < 0)
{
cupgrid.y = CUPMENU_ROWS-1; cupgrid.y = CUPMENU_ROWS-1;
cupgrid.pageno++;
if (cupgrid.pageno >= cupgrid.numpages)
cupgrid.pageno = 0;
}
S_StartSound(NULL, sfx_s3k5b); S_StartSound(NULL, sfx_s3k5b);
M_SetMenuDelay(pid); M_SetMenuDelay(pid);
} }