introduce

This commit is contained in:
Fabian Greffrath 2022-11-28 08:45:44 +01:00
parent 1fb4a96cab
commit a63e16b14c
3 changed files with 12 additions and 5 deletions

View File

@ -133,7 +133,7 @@ boolean inhelpscreens; // indicates we are in or just left a help screen
boolean menuactive; // The menus are up
int menu_background;
background_t menu_background;
#define SKULLXOFF -32
#define LINEHEIGHT 16
@ -2026,7 +2026,7 @@ menu_t CompatDef = // killough 10/98
void M_DrawBackground(char *patchname, byte *back_dest)
{
if (setup_active && menu_background)
if (setup_active && menu_background != background_on)
return;
R_DrawBackground(patchname, back_dest);
@ -6533,7 +6533,7 @@ void M_StartControlPanel (void)
boolean M_MenuIsShaded(void)
{
return setup_active && menu_background == 2;
return setup_active && menu_background == background_dark;
}
void M_Drawer (void)

View File

@ -184,7 +184,14 @@ typedef struct setup_menu_s
const char **selectstrings; // [FG] selection of choices
} setup_menu_t;
extern int menu_background;
typedef enum
{
background_on,
background_off,
background_dark,
} background_t;
extern background_t menu_background;
extern boolean M_MenuIsShaded(void);
#endif

View File

@ -283,7 +283,7 @@ default_t defaults[] = {
{
"menu_background",
(config_t *) &menu_background, NULL,
{0}, {0,2}, number, ss_gen, wad_no,
{background_on}, {background_on,background_dark}, number, ss_gen, wad_no,
"draw menu background (0 = on, 1 = off, 2 = dark)"
},