Add con_notifylines, to configure number of lines in notify area

This commit is contained in:
Tim Angus 2025-10-27 22:00:09 +00:00
parent c3a2aa45a8
commit a553ad13d8
2 changed files with 7 additions and 2 deletions

View File

@ -262,6 +262,8 @@ the above locations, if desired.
input text when console is closed
con_scale - Scales console text to make it legible at
high resolutions
con_notifylines - The number of lines to display in the
notify area
in_joystickUseAnalog - Do not translate joystick axis events
to keyboard commands

View File

@ -29,7 +29,7 @@ int g_console_field_width = DEFAULT_CONSOLE_WIDTH;
int g_smallchar_width = SMALLCHAR_WIDTH;
int g_smallchar_height = SMALLCHAR_HEIGHT;
#define NUM_CON_TIMES 4
#define NUM_CON_TIMES 17
#define CON_TEXTSIZE 32768
typedef struct {
@ -60,6 +60,7 @@ console_t con;
cvar_t *con_conspeed;
cvar_t *con_autoclear;
cvar_t *con_notifytime;
cvar_t *con_notifylines;
cvar_t *con_scale;
@ -365,6 +366,8 @@ void Con_Init (void) {
int i;
con_notifytime = Cvar_Get ("con_notifytime", "3", CVAR_ARCHIVE);
con_notifylines = Cvar_Get ("con_notifylines", "3", CVAR_ARCHIVE);
Cvar_CheckRange(con_notifylines, 1, NUM_CON_TIMES - 1, qtrue);
con_conspeed = Cvar_Get ("scr_conspeed", "3", CVAR_ARCHIVE);
con_autoclear = Cvar_Get("con_autoclear", "1", CVAR_ARCHIVE);
con_scale = Cvar_Get("con_scale", "1", CVAR_ARCHIVE);
@ -584,7 +587,7 @@ void Con_DrawNotify (void)
re.SetColor( g_color_table[currentColor] );
v = 0;
for (i= con.current-NUM_CON_TIMES+1 ; i<=con.current ; i++)
for (i= con.current-con_notifylines->integer ; i<=con.current ; i++)
{
int linelength = 0;