Skip to content

Commit

Permalink
"Background for all menus" setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed Nov 4, 2023
1 parent 960c69b commit 7d07c6c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## New Features

- **_Background for all menus_** setting
- **Minimap mode for Automap**
- **NUGHUD:**
- Ammo and Health icons;
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ For these settings, their CVAR names are provided alongside the _CFG-Only_ label
- _**Teleporter Zoom**_ setting [i.b. ZDoom]
- _**Death Camera**_ setting [i.b. ZDoom]
- _**Chasecam**_ [i.b. ZDoom]
- _**Background for all menus**_ setting
- _**Disable palette tint in menus**_ setting [i.b. Crispy Doom]
- _**Disable Berserk Tint**_ setting
- _**Disable Radiation Suit Tint**_ setting
Expand Down
2 changes: 2 additions & 0 deletions src/doomstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ int chasecam_mode;
int chasecam_distance;
int chasecam_height;

int menu_background_all;
int no_menu_tint;
int no_berserk_tint;
int no_radsuit_tint;
Expand All @@ -166,6 +167,7 @@ int s_clipping_dist_x2;
int one_key_saveload;
int no_page_ticking;
int quick_quitgame;

//int a11y_sector_lighting;
int a11y_weapon_flash;
int a11y_weapon_pspr;
Expand Down
2 changes: 2 additions & 0 deletions src/doomstat.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ enum {
extern int chasecam_distance;
extern int chasecam_height;

extern int menu_background_all;
extern int no_menu_tint;
extern int no_berserk_tint;
extern int no_radsuit_tint;
Expand All @@ -494,6 +495,7 @@ extern int s_clipping_dist_x2;
extern int one_key_saveload;
extern int no_page_ticking;
extern int quick_quitgame;

//extern int a11y_sector_lighting;
extern int a11y_weapon_flash;
extern int a11y_weapon_pspr;
Expand Down
12 changes: 9 additions & 3 deletions src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4429,6 +4429,7 @@ enum {

enum {
gen7_title1,
gen7_menubgall,
gen7_menutint,
gen7_berserktint,
gen7_radsuittint,
Expand Down Expand Up @@ -4765,6 +4766,7 @@ static const char *page_ticking_conds[] = {
setup_menu_t gen_settings7[] = { // [Nugget]

{"Nugget - Display", S_SKIP|S_TITLE, m_null, M_X, M_Y + gen7_title1 * M_SPC},
{"Background For All Menus", S_YESNO , m_null, M_X, M_Y + gen7_menubgall * M_SPC, {"menu_background_all"}},
{"Disable Palette Tint in Menus", S_YESNO |S_STRICT, m_null, M_X, M_Y + gen7_menutint * M_SPC, {"no_menu_tint"}},
{"Disable Berserk Tint", S_YESNO |S_STRICT, m_null, M_X, M_Y + gen7_berserktint * M_SPC, {"no_berserk_tint"}},
{"Disable Radiation Suit Tint", S_YESNO |S_STRICT, m_null, M_X, M_Y + gen7_radsuittint * M_SPC, {"no_radsuit_tint"}},
Expand Down Expand Up @@ -5878,7 +5880,7 @@ setup_menu_t cred_settings[]={
{"Woof! by",S_SKIP|S_CREDIT,m_null, CR_X, CR_Y + CR_S*woof + CR_SH*cr_woof},
{"Fabian Greffrath",S_SKIP|S_CREDIT|S_LEFTJUST,m_null, CR_X2, CR_Y + CR_S*woof + CR_SH*cr_woof},

// [Nugget] [insert moyai here]
// [Nugget] :moyai:
{"Nugget Doom by",S_SKIP|S_CREDIT,m_null, CR_X, CR_Y + CR_S*nugget + CR_SH*cr_nugget},
{"Alaux",S_SKIP|S_CREDIT|S_LEFTJUST,m_null, CR_X2, CR_Y + CR_S*nugget + CR_SH*cr_nugget},

Expand Down Expand Up @@ -7394,15 +7396,19 @@ void M_StartControlPanel (void)

boolean M_MenuIsShaded(void)
{
return setup_active && menu_background == background_dark;
return (setup_active || (menuactive && menu_background_all)) // [Nugget]
&& menu_background == background_dark;
}

void M_Drawer (void)
{
if (M_MenuIsShaded())
V_ShadeScreen(menu_background_darkening); // [Nugget] Parameterized
// [Nugget]
else if (!setup_active && menu_background_all && menu_background == background_on)
M_DrawBackground("FLOOR4_6", screens[0]);

inhelpscreens = false;
inhelpscreens = true; // [Nugget] Force Status Bar redraw in all menus

// Horiz. & Vertically center string and print it.
// killough 9/29/98: simplified code, removed 40-character width limit
Expand Down
9 changes: 8 additions & 1 deletion src/m_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ default_t defaults[] = {
"menu_background",
(config_t *) &menu_background, NULL,
{background_on}, {background_on,background_dark}, number, ss_gen, wad_no,
"draw menu background (0 = on, 1 = off, 2 = dark)"
"menu background type (0 = solid, 1 = off, 2 = dark)" // [Nugget] Changed description
},

{ // [Nugget]
Expand Down Expand Up @@ -806,6 +806,13 @@ default_t defaults[] = {
"1 to allow crosshair when using Chasecam"
},

{
"menu_background_all",
(config_t *) &menu_background_all, NULL,
{0}, {0,1}, number, ss_gen, wad_no,
"1 to draw background for all menus"
},

{
"no_menu_tint",
(config_t *) &no_menu_tint, NULL,
Expand Down

0 comments on commit 7d07c6c

Please sign in to comment.