Menu: fix camera options from within accessability options returning to the main menu

really wonky setup, but some other menus do similar things...
This commit is contained in:
Alug committed 2025-12-05 19:12:48 +01:00
1 parent 083b1c7cc7
commit 58c30d421f
2 files changed
+22 -7

No files matched your search

+19 -4
View File
@@ -256,6 +256,7 @@ static char *M_GetConditionString(condition_t cond);
// Misc. Main Menu
static void M_Options(INT32 choice);
static void M_Multiplayer(INT32 choice);
static void M_CameraMenu(INT32 choice);
static void M_LocalSkinMenu(INT32 choice);
static void M_LocalSkinChange(INT32 choice);
static void M_Manual(INT32 choice);
@@ -646,22 +647,28 @@ void Nextmap_OnChange(void)
SP_ReplayMenu[i].status = IT_DISABLED;
SP_GuestReplayMenu[i].status = IT_DISABLED;
}
SP_ReplayMenu[4].status = IT_DISABLED;
SP_GhostMenu[3].status = IT_DISABLED;
SP_GhostMenu[4].status = IT_DISABLED;
if (FIL_FileExists(va("%s-%s-time-best.lmp", gpath, cv_chooseskin.string))) {
if (FIL_FileExists(va("%s-%s-time-best.lmp", gpath, cv_chooseskin.string)))
{
SP_ReplayMenu[0].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[0].status = IT_WHITESTRING|IT_CALL;
active |= 3;
}
if (FIL_FileExists(va("%s-%s-lap-best.lmp", gpath, cv_chooseskin.string))) {
if (FIL_FileExists(va("%s-%s-lap-best.lmp", gpath, cv_chooseskin.string)))
{
SP_ReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
active |= 3;
}
if (FIL_FileExists(va("%s-%s-last.lmp", gpath, cv_chooseskin.string))) {
if (FIL_FileExists(va("%s-%s-last.lmp", gpath, cv_chooseskin.string)))
{
SP_ReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
active |= 3;
@@ -684,7 +691,8 @@ void Nextmap_OnChange(void)
active |= 1;
}
if (active) {
if (active)
{
if (active & 1)
SP_TimeAttackMenu[tareplay].status = IT_WHITESTRING|IT_SUBMENU;
if (active & 2)
@@ -9756,6 +9764,13 @@ static void M_DrawHUDOptions(void)
V_DrawRightAlignedString(x, y, highlightflags, "(");
}
static void M_CameraMenu(INT32 choice)
{
(void)choice;
OP_CamOptionsDef.prevMenu = currentMenu;
M_SetupNextMenu(&OP_CamOptionsDef);
}
static void M_LocalSkinMenu(INT32 choice)
{
(void)choice;
+3 -3
View File
@@ -600,7 +600,7 @@ static menuitem_t OP_MainMenu[] =
{IT_SUBMENU|IT_STRING, NULL, "Game Focus Options...", &OP_FocusOptionsDef, 33},
{IT_SUBMENU|IT_STRING, NULL, "HUD Options...", &OP_HUDOptionsDef, 46},
{IT_SUBMENU|IT_STRING, NULL, "Camera Options...", &OP_CamOptionsDef, 56},
{IT_CALL|IT_STRING, NULL, "Camera Options...", M_CameraMenu, 56},
{IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 66},
{IT_SUBMENU|IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 76},
@@ -610,7 +610,7 @@ static menuitem_t OP_MainMenu[] =
{IT_CALL|IT_STRING, NULL, "Tricks & Secrets (F1)", M_Manual, 109},
{IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 119},
{IT_SUBMENU|IT_STRING, NULL, "Accessibility Options...",&OP_AccessibilityDef, 132},
{IT_SUBMENU|IT_STRING, NULL, "Accessibility Options...", &OP_AccessibilityDef, 132},
{IT_SUBMENU|IT_STRING, NULL, "Saturn Options...", &OP_SaturnDef, 142},
{IT_SUBMENU|IT_STRING, NULL, "Bird...", &OP_BirdDef, 152},
@@ -1658,7 +1658,7 @@ static menuitem_t OP_AccessibilityMenu[] =
{IT_STRING|IT_CVAR, NULL, "Quake Screenshakes", &cv_screenquake, 60},
{IT_SUBMENU|IT_STRING, NULL, "Camera Options...", &OP_CamOptionsDef, 65},
{IT_CALL|IT_STRING, NULL, "Camera Options...", M_CameraMenu, 65},
{IT_HEADER, NULL, "Audio", NULL, 75},