diff --git a/src/m_menu.c b/src/m_menu.c index 44d29e27..e5a92cee 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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) diff --git a/src/m_menu.h b/src/m_menu.h index eabd9f06..c1e7d227 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -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 diff --git a/src/m_misc.c b/src/m_misc.c index 807d20ba..17f28bdc 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -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)" },