mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 08:22:28 +00:00
Challenges menu: Sidestep the problem with holding down the "flip to see the other side" button by making it instead a toggle
This toggle gets switched off when pressing any movement input to make it not possible to just leave on all the time and make the menu messy
This commit is contained in:
parent
1654b2869b
commit
1ccde62f8a
2 changed files with 13 additions and 1 deletions
|
|
@ -1158,6 +1158,8 @@ extern struct challengesmenu_s {
|
|||
boolean pending;
|
||||
boolean requestnew;
|
||||
|
||||
boolean requestflip;
|
||||
|
||||
UINT8 unlockcount[CC_MAX];
|
||||
|
||||
UINT8 fade;
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ menu_t *M_InterruptMenuWithChallenges(menu_t *desiredmenu)
|
|||
if (challengesmenu.pending || desiredmenu == NULL)
|
||||
{
|
||||
challengesmenu.ticker = 0;
|
||||
challengesmenu.requestflip = false;
|
||||
challengesmenu.requestnew = false;
|
||||
challengesmenu.currentunlock = MAXUNLOCKABLES;
|
||||
challengesmenu.unlockcondition = NULL;
|
||||
|
|
@ -287,7 +288,7 @@ void M_ChallengesTick(void)
|
|||
if (challengesmenu.extradata != NULL)
|
||||
{
|
||||
UINT16 id = (challengesmenu.hilix * CHALLENGEGRIDHEIGHT) + challengesmenu.hiliy;
|
||||
boolean seeeveryone = M_MenuButtonHeld(pid, MBT_R);
|
||||
boolean seeeveryone = challengesmenu.requestflip;
|
||||
boolean allthewaythrough;
|
||||
UINT8 maxflip;
|
||||
for (i = 0; i < (CHALLENGEGRIDHEIGHT * gamedata->challengegridwidth); i++)
|
||||
|
|
@ -479,8 +480,17 @@ boolean M_ChallengesInputs(INT32 ch)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (M_MenuButtonPressed(pid, MBT_R))
|
||||
{
|
||||
challengesmenu.requestflip ^= true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (challengesmenu.extradata != NULL && move)
|
||||
{
|
||||
challengesmenu.requestflip = false;
|
||||
|
||||
// Determine movement around the grid
|
||||
// For right/down movement, we can pre-determine the number of steps based on extradata.
|
||||
// For left/up movement, we can't - we have to be ready to iterate twice, and break early if we don't run into a large tile.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue