diff --git a/src/k_menu.h b/src/k_menu.h index 887db519f..50bba91e5 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -140,6 +140,7 @@ typedef enum MBF_SOUNDLESS = 1<<1, // do not play base menu sounds MBF_NOLOOPENTRIES = 1<<2, // do not loop M_NextOpt/M_PrevOpt MBF_DRAWBGWHILEPLAYING = 1<<3, // run backroutine() outside of GS_MENU + MBF_CANTRESTORE = 1<<4, // Do not use in restoreMenu } menubehaviourflags_t; struct menuitem_t diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 64da0fecd..78842740f 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -662,7 +662,7 @@ boolean M_ConsiderSealedSwapAlert(void) void M_ValidateRestoreMenu(void) { - if (restoreMenu == NULL || restoreMenu == &MAIN_GonerDef) + if (restoreMenu == NULL || (restoreMenu->behaviourflags & MBF_CANTRESTORE)) restoreMenu = &MainDef; } diff --git a/src/menus/main-goner.cpp b/src/menus/main-goner.cpp index 148fad752..a0e9675e3 100644 --- a/src/menus/main-goner.cpp +++ b/src/menus/main-goner.cpp @@ -72,7 +72,7 @@ menu_t MAIN_GonerDef = { MAIN_Goner, 26, 160, 0, sizeof (MAIN_Goner) / sizeof (menuitem_t), // extra2 is final width - MBF_UD_LR_FLIPPED, + MBF_CANTRESTORE|MBF_UD_LR_FLIPPED, "_GONER", 0, 0, M_GonerDrawer, @@ -83,7 +83,7 @@ menu_t MAIN_GonerDef = { M_GonerInputs, }; -menuitem_t MAIN_GonerChoice[] = +static menuitem_t MAIN_GonerChoice[] = { {IT_STRING | IT_CALL, "Tails' way", "As a child scientist, Tails has recorded bits\n" @@ -106,14 +106,14 @@ menuitem_t MAIN_GonerChoice[] = NULL, {.routine = M_GonerPlayground}, 0, 0}, }; -menu_t MAIN_GonerChoiceDef = { +static menu_t MAIN_GonerChoiceDef = { sizeof (MAIN_GonerChoice) / sizeof (menuitem_t), &MAIN_GonerDef, 0, MAIN_GonerChoice, 26, 160, 0, 0, - MBF_UD_LR_FLIPPED|MBF_NOLOOPENTRIES, + MBF_CANTRESTORE|MBF_UD_LR_FLIPPED|MBF_NOLOOPENTRIES, "_GONER", 0, 0, M_GonerChoiceDrawer,