Hide Encore on the Gameplay Options menu if not unlocked

This commit is contained in:
toaster 2022-09-04 22:14:41 +01:00
parent 9d26fa2040
commit 0c4dca611d
3 changed files with 18 additions and 1 deletions

View file

@ -325,6 +325,21 @@ extern menu_t OPTIONS_HUDDef;
extern menuitem_t OPTIONS_HUDOnline[];
extern menu_t OPTIONS_HUDOnlineDef;
typedef enum
{
gopt_gamespeed = 0,
gopt_baselapcount,
gopt_frantic,
gopt_encore,
gopt_exitcountdown,
gopt_spacer1,
gopt_timelimit,
gopt_startingbumpers,
gopt_karmacomeback,
gopt_spacer2,
gopt_itemtoggles
} gopt_e;
extern menuitem_t OPTIONS_Gameplay[];
extern menu_t OPTIONS_GameplayDef;

View file

@ -1007,7 +1007,7 @@ menu_t OPTIONS_HUDOnlineDef = {
NULL,
};
// Gameplay options -- see gopt_e
menuitem_t OPTIONS_Gameplay[] =
{

View file

@ -4417,6 +4417,8 @@ void M_InitOptions(INT32 choice)
{
OPTIONS_MainDef.menuitems[mopt_gameplay].status = IT_STRING | IT_SUBMENU;
OPTIONS_MainDef.menuitems[mopt_server].status = IT_STRING | IT_SUBMENU;
OPTIONS_GameplayDef.menuitems[gopt_encore].status =
(M_SecretUnlocked(SECRET_ENCORE) ? (IT_STRING | IT_CVAR) : IT_DISABLED);
}
OPTIONS_DataDef.menuitems[dopt_erase].status = (gamestate == GS_MENU