160
160
161
161
extern dboolean message_dontfuckwithme ;
162
162
163
+ /////////////////////////////
164
+ //
165
+ // booleans for setup screens
166
+ // these tell you what state the setup screens are in, and whether any of
167
+ // the overlay screens (automap colors, reset button message) should be
168
+ // displayed
169
+
170
+ dboolean setup_active = false; // in one of the setup screens
171
+ dboolean set_keybnd_active = false; // in key binding setup screens
172
+ dboolean set_weapon_active = false; // in weapons setup screen
173
+ dboolean set_status_active = false; // in status bar/hud setup screen
174
+ dboolean set_auto_active = false; // in automap setup screen
175
+ dboolean setup_select = false; // changing an item
176
+ dboolean setup_gather = false; // gathering keys for value
177
+ dboolean colorbox_active = false; // color palette being shown
178
+ dboolean set_general_active = false;
179
+ dboolean level_table_active = false;
180
+
181
+
163
182
extern const char * g_menu_flat ;
164
183
extern int g_menu_save_page_size ;
165
184
extern int g_menu_font_spacing ;
@@ -188,7 +207,7 @@ void (*messageRoutine)(int response);
188
207
189
208
static void M_DrawBackground (const char * flat , int scrn )
190
209
{
191
- if (dsda_IntConfig (dsda_config_menu_background ))
210
+ if (dsda_IntConfig (dsda_config_menu_background ) == 2 )
192
211
V_DrawBackground (flat , scrn );
193
212
}
194
213
@@ -1250,6 +1269,8 @@ static void M_QuitResponse(dboolean affirmative)
1250
1269
void M_QuitDOOM (int choice )
1251
1270
{
1252
1271
static char endstring [160 ];
1272
+ setup_active = false;
1273
+ currentMenu = NULL ;
1253
1274
1254
1275
// We pick index 0 which is language sensitive,
1255
1276
// or one at random, between 1 and maximum number.
@@ -1508,24 +1529,6 @@ void M_SizeDisplay(int choice)
1508
1529
// killough 10/98: added Compatibility and General menus
1509
1530
//
1510
1531
1511
- /////////////////////////////
1512
- //
1513
- // booleans for setup screens
1514
- // these tell you what state the setup screens are in, and whether any of
1515
- // the overlay screens (automap colors, reset button message) should be
1516
- // displayed
1517
-
1518
- dboolean setup_active = false; // in one of the setup screens
1519
- dboolean set_keybnd_active = false; // in key binding setup screens
1520
- dboolean set_weapon_active = false; // in weapons setup screen
1521
- dboolean set_status_active = false; // in status bar/hud setup screen
1522
- dboolean set_auto_active = false; // in automap setup screen
1523
- dboolean setup_select = false; // changing an item
1524
- dboolean setup_gather = false; // gathering keys for value
1525
- dboolean colorbox_active = false; // color palette being shown
1526
- dboolean set_general_active = false;
1527
- dboolean level_table_active = false;
1528
-
1529
1532
/////////////////////////////
1530
1533
//
1531
1534
// set_menu_itemon is an index that starts at zero, and tells you which
@@ -3098,6 +3101,8 @@ setup_menu_t misc_settings[] = {
3098
3101
FINAL_ENTRY
3099
3102
};
3100
3103
3104
+ static const char * menu_background_list [] = { "Off" , "Dark" , "Texture" , NULL };
3105
+
3101
3106
setup_menu_t display_settings [] = {
3102
3107
{ "Display Options" , S_SKIP | S_TITLE , m_null , G_X },
3103
3108
{ "Use Extended Hud" , S_YESNO , m_conf , G_X , dsda_config_exhud },
@@ -3117,7 +3122,7 @@ setup_menu_t display_settings[] = {
3117
3122
{ "Change Palette On Powers" , S_YESNO , m_conf , G_X , dsda_config_palette_onpowers },
3118
3123
EMPTY_LINE ,
3119
3124
{ "Status Bar and Menu Appearance" , S_CHOICE , m_conf , G_X , dsda_config_render_stretch_hud , 0 , render_stretch_list },
3120
- { "Fullscreen Menu Background" , S_YESNO , m_conf , G_X , dsda_config_menu_background },
3125
+ { "Fullscreen Menu Background" , S_CHOICE , m_conf , G_X , dsda_config_menu_background , 0 , menu_background_list },
3121
3126
3122
3127
PREV_PAGE (misc_settings ),
3123
3128
NEXT_PAGE (mapping_settings ),
@@ -5827,6 +5832,29 @@ void M_StartControlPanel (void)
5827
5832
itemOn = currentMenu -> lastOn ; // JDC
5828
5833
}
5829
5834
5835
+
5836
+ /////////////////////////////////////////////////////////////////////////////
5837
+ //
5838
+ // Menu Shaded Overlay Stuff
5839
+ //
5840
+ // This displays a dark overlay under certain screens of the menus
5841
+
5842
+ dboolean fadeBG (void )
5843
+ {
5844
+ return dsda_IntConfig (dsda_config_menu_background ) == 1 ;
5845
+ }
5846
+
5847
+ dboolean M_MenuIsShaded (void )
5848
+ {
5849
+ int Options = (setup_active || currentMenu == & OptionsDef || currentMenu == & SoundDef );
5850
+ return fadeBG () && Options ;
5851
+ }
5852
+
5853
+ static void M_ShadedScreen (int scrn )
5854
+ {
5855
+ V_DrawShaded (scrn , 0 , 0 , SCREENWIDTH , SCREENHEIGHT , FULLSHADE );
5856
+ }
5857
+
5830
5858
//
5831
5859
// M_Drawer
5832
5860
// Called after the view has been rendered,
@@ -5839,6 +5867,9 @@ void M_Drawer (void)
5839
5867
{
5840
5868
V_BeginUIDraw ();
5841
5869
5870
+ if (M_MenuIsShaded ())
5871
+ M_ShadedScreen (0 );
5872
+
5842
5873
inhelpscreens = false;
5843
5874
5844
5875
// Horiz. & Vertically center string and print it.
0 commit comments