mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make back button properly confirm settings
This commit is contained in:
parent
0fe3e6ceeb
commit
6eb5b2dee9
3 changed files with 22 additions and 12 deletions
|
|
@ -856,6 +856,7 @@ void M_ProfileSetControl(INT32 ch);
|
||||||
|
|
||||||
void M_MapProfileControl(event_t *ev);
|
void M_MapProfileControl(event_t *ev);
|
||||||
void M_ProfileTryController(INT32 choice);
|
void M_ProfileTryController(INT32 choice);
|
||||||
|
void M_ProfileConfirm(INT32 choice);
|
||||||
|
|
||||||
// video modes menu (resolution)
|
// video modes menu (resolution)
|
||||||
void M_VideoModeMenu(INT32 choice);
|
void M_VideoModeMenu(INT32 choice);
|
||||||
|
|
|
||||||
|
|
@ -680,8 +680,8 @@ menuitem_t OPTIONS_ProfileControls[] = {
|
||||||
{IT_STRING | IT_CALL, "TRY MAPPINGS", "Test your controls.",
|
{IT_STRING | IT_CALL, "TRY MAPPINGS", "Test your controls.",
|
||||||
NULL, {.routine = M_ProfileTryController}, 0, 0},
|
NULL, {.routine = M_ProfileTryController}, 0, 0},
|
||||||
|
|
||||||
{IT_STRING | IT_CALL, "BACK...", "Go back to profile setup.",
|
{IT_STRING | IT_CALL, "CONFIRM", "Go back to profile setup.",
|
||||||
NULL, {.routine = M_GoBack}, 0, 0},
|
NULL, {.routine = M_ProfileConfirm}, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5113,6 +5113,24 @@ static void M_ProfileControlSaveResponse(INT32 choice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void M_ProfileConfirm(INT32 choice)
|
||||||
|
{
|
||||||
|
(void)choice;
|
||||||
|
|
||||||
|
//M_StartMessage(M_GetText("Exiting will save the control changes\nfor this Profile.\nIs this okay?\n\n(Press A to confirm)"), FUNCPTRCAST(M_ProfileControlSaveResponse), MM_YESNO);
|
||||||
|
// TODO: Add a graphic for controls saving, instead of obnoxious prompt.
|
||||||
|
|
||||||
|
M_ProfileControlSaveResponse(MA_YES);
|
||||||
|
|
||||||
|
optionsmenu.profile->kickstartaccel = cv_dummyprofilekickstart.value; // Make sure to save kickstart accel.
|
||||||
|
|
||||||
|
// Reapply player 1's real profile.
|
||||||
|
if (cv_currprofile.value > -1)
|
||||||
|
{
|
||||||
|
PR_ApplyProfile(cv_lastprofile[0].value, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean M_ProfileControlsInputs(INT32 ch)
|
boolean M_ProfileControlsInputs(INT32 ch)
|
||||||
{
|
{
|
||||||
const UINT8 pid = 0;
|
const UINT8 pid = 0;
|
||||||
|
|
@ -5165,16 +5183,7 @@ boolean M_ProfileControlsInputs(INT32 ch)
|
||||||
}
|
}
|
||||||
else if (M_MenuBackPressed(pid))
|
else if (M_MenuBackPressed(pid))
|
||||||
{
|
{
|
||||||
//M_StartMessage(M_GetText("Exiting will save the control changes\nfor this Profile.\nIs this okay?\n\n(Press A to confirm)"), FUNCPTRCAST(M_ProfileControlSaveResponse), MM_YESNO);
|
M_ProfileControlsConfirm();
|
||||||
// TODO: Add a graphic for controls saving, instead of obnoxious prompt.
|
|
||||||
M_ProfileControlSaveResponse(MA_YES);
|
|
||||||
|
|
||||||
optionsmenu.profile->kickstartaccel = cv_dummyprofilekickstart.value; // Make sure to save kickstart accel.
|
|
||||||
|
|
||||||
// Reapply player 1's real profile.
|
|
||||||
if (cv_currprofile.value > -1)
|
|
||||||
PR_ApplyProfile(cv_lastprofile[0].value, 0);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue