Make "Focus lost" HUD overlay optional

This commit is contained in:
James R 2019-03-11 12:50:01 -07:00
parent 43ca2c1b30
commit 12540dca32
1 changed files with 6 additions and 1 deletions

View File

@ -387,6 +387,8 @@ static void Dummymares_OnChange(void);
// CONSOLE VARIABLES AND THEIR POSSIBLE VALUES GO HERE.
// ==========================================================================
consvar_t cv_showfocuslost = {"showfocuslost", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL };
static CV_PossibleValue_t map_cons_t[] = {
{1,"MIN"},
{NUMMAPS, "MAX"}
@ -1230,6 +1232,7 @@ static menuitem_t OP_VideoOptionsMenu[] =
{IT_HEADER, NULL, "Diagnostic", NULL, 180},
{IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 186},
{IT_STRING | IT_CVAR, NULL, "Clear Before Redraw", &cv_homremoval, 191},
{IT_STRING | IT_CVAR, NULL, "Show \"FOCUS LOST\"", &cv_showfocuslost, 196},
};
static menuitem_t OP_VideoModeMenu[] =
@ -3322,7 +3325,7 @@ void M_Drawer(void)
}
// focus lost notification goes on top of everything, even the former everything
if (window_notinfocus)
if (window_notinfocus && cv_showfocuslost.value)
{
M_DrawTextBox((BASEVIDWIDTH/2) - (60), (BASEVIDHEIGHT/2) - (16), 13, 2);
if (gamestate == GS_LEVEL && (P_AutoPause() || paused))
@ -3547,6 +3550,8 @@ void M_Init(void)
{
int i;
CV_RegisterVar(&cv_showfocuslost);
CV_RegisterVar(&cv_nextmap);
CV_RegisterVar(&cv_newgametype);
CV_RegisterVar(&cv_chooseskin);