mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-04 04:36:21 +00:00
Menus/Controls: confirm changes on go back (bypassing confirm button)
This commit is contained in:
parent
d2f48eda29
commit
726415981f
1 changed files with 25 additions and 7 deletions
|
|
@ -193,19 +193,37 @@ static void M_ProfileControlSaveResponse(INT32 choice)
|
|||
{
|
||||
memcpy(&gamecontrol[belongsto], optionsmenu.tempcontrols, sizeof(gamecontroldefault));
|
||||
}
|
||||
|
||||
M_GoBack(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Revert changes
|
||||
memcpy(optionsmenu.tempcontrols, optionsmenu.profile->controls, sizeof(gamecontroldefault));
|
||||
}
|
||||
|
||||
M_GoBack(0);
|
||||
}
|
||||
|
||||
void M_ProfileControlsConfirm(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
if (!memcmp(optionsmenu.profile->controls, optionsmenu.tempcontrols, sizeof(gamecontroldefault)))
|
||||
{
|
||||
M_GoBack(0); // no change
|
||||
}
|
||||
else if (choice == 0)
|
||||
{
|
||||
M_StartMessage(
|
||||
"Profiles",
|
||||
"You have unsaved changes to your controls.\n"
|
||||
"Please confirm if you wish to save them.\n",
|
||||
&M_ProfileControlSaveResponse,
|
||||
MM_YESNO,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
else
|
||||
M_ProfileControlSaveResponse(MA_YES);
|
||||
|
||||
//M_StartMessage("Profiles", M_GetText("Exiting will save the control changes\nfor this Profile.\nIs this okay?\n"), &M_ProfileControlSaveResponse, MM_YESNO, NULL, NULL);
|
||||
// TODO: Add a graphic for controls saving, instead of obnoxious prompt.
|
||||
|
||||
M_ProfileControlSaveResponse(MA_YES);
|
||||
|
||||
// Reapply player 1's real profile.
|
||||
if (cv_currprofile.value > -1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue