Commit
* Added con_background cvar to set solid color for console background.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ console_t con; | |
cvar_t *con_notifytime; | ||
cvar_t *con_openspeed; | ||
cvar_t *con_autoclear; | ||
cvar_t *con_background; | ||
|
||
vec4_t console_highlightcolor = { 0.5f, 0.5f, 0.2f, 0.45f }; | ||
|
||
|
@@ -321,6 +322,7 @@ void Con_Init(void) | |
con_notifytime = Cvar_Get("con_notifytime", "7", 0); // increased per id req for obits | ||
con_openspeed = Cvar_Get("con_openspeed", "3", 0); | ||
con_autoclear = Cvar_Get("con_autoclear", "1", CVAR_ARCHIVE); | ||
con_background = Cvar_GetAndDescribe("con_background", "", CVAR_ARCHIVE, "Console background color in normalized RGBA format, eg. \"0.2 0.2 0.2 0.8\"."); | ||
|
||
Field_Clear(&g_consoleField); | ||
g_consoleField.widthInChars = g_console_field_width; | ||
|
@@ -750,8 +752,14 @@ void Con_DrawSolidConsole(float frac) | |
} | ||
else | ||
{ | ||
SCR_DrawPic(0, 0, SCREEN_WIDTH, y, cls.consoleShader); | ||
|
||
if (Q_ParseColorRGBA(con_background->string, color)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
isRyven
Author
Member
|
||
{ | ||
SCR_FillRect(0, 0, SCREEN_WIDTH, y, color); | ||
} | ||
else | ||
{ | ||
SCR_DrawPic(0, 0, SCREEN_WIDTH, y, cls.consoleShader); | ||
} | ||
/* | ||
// draw the logo | ||
if (frac >= 0.5f) | ||
|
Now the obvious, unavoidable bikeshedding: What if we wanted to keep the consoleShader but add some color on top of it? Would it make sense to add that option?