From: havoc Date: Tue, 18 Apr 2006 06:28:17 +0000 (+0000) Subject: conback lives... again! X-Git-Tag: xonotic-v0.1.0preview~4060 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=986e2df5ca730f3984b37805aa48c6359d09f042;p=xonotic%2Fdarkplaces.git conback lives... again! git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6305 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index b37f82c9..4f5c56fa 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -9,6 +9,7 @@ cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"}; cvar_t scr_fov = {CVAR_SAVE, "fov","90", "field of vision, 1-170 degrees, default 90, some players use 110-130"}; // 1 - 170 cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "1", "opacity of console background"}; +cvar_t scr_conbrightness = {CVAR_SAVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"}; cvar_t scr_conforcewhiledisconnected = {0, "scr_conforcewhiledisconnected", "1", "forces fullscreen console while disconnected"}; cvar_t scr_menuforcewhiledisconnected = {0, "scr_menuforcewhiledisconnected", "0", "forces menu while disconnected"}; cvar_t scr_centertime = {0, "scr_centertime","2", "how long centerprint messages show"}; @@ -510,6 +511,7 @@ void CL_Screen_Init(void) Cvar_RegisterVariable (&scr_fov); Cvar_RegisterVariable (&scr_viewsize); Cvar_RegisterVariable (&scr_conalpha); + Cvar_RegisterVariable (&scr_conbrightness); Cvar_RegisterVariable (&scr_conforcewhiledisconnected); Cvar_RegisterVariable (&scr_menuforcewhiledisconnected); Cvar_RegisterVariable (&scr_showram); diff --git a/console.c b/console.c index c3c2d667..80e14462 100644 --- a/console.c +++ b/console.c @@ -841,7 +841,7 @@ void Con_DrawConsole (int lines) return; // draw the background - DrawQ_Pic(0, lines - vid_conheight.integer, NULL, vid_conwidth.integer, vid_conheight.integer, 0, 0, 0, scr_conalpha.value, 0); + DrawQ_Pic(0, lines - vid_conheight.integer, scr_conbrightness.value >= 0.01f ? Draw_CachePic("gfx/conback", true) : NULL, vid_conwidth.integer, vid_conheight.integer, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, scr_conalpha.value, 0); DrawQ_String(vid_conwidth.integer - strlen(engineversion) * con_textsize.value - con_textsize.value, lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0); // draw the text diff --git a/menu.c b/menu.c index 6ffb2c90..19f63f67 100644 --- a/menu.c +++ b/menu.c @@ -1561,6 +1561,8 @@ static void M_Menu_Options_AdjustSliders (int dir) Cvar_SetValueQuick (&vid_conheight, bound(240, vid_conheight.value + dir * 48, 1536)); else if (options_cursor == optnum++) Cvar_SetValueQuick (&scr_conalpha, bound(0, scr_conalpha.value + dir * 0.2, 1)); + else if (options_cursor == optnum++) + Cvar_SetValueQuick (&scr_conbrightness, bound(0, scr_conbrightness.value + dir * 0.2, 1)); else if (options_cursor == optnum++) Cvar_SetValueQuick (&sbar_alpha_bg, bound(0, sbar_alpha_bg.value + dir * 0.1, 1)); else if (options_cursor == optnum++) @@ -1695,6 +1697,7 @@ static void M_Options_Draw (void) M_Options_PrintSlider( " 2D Screen Width ", true, vid_conwidth.value, 320, 2048); M_Options_PrintSlider( " 2D Screen Height", true, vid_conheight.value, 240, 1536); M_Options_PrintSlider( " Console Alpha", true, scr_conalpha.value, 0, 1); + M_Options_PrintSlider( "Conback Brightness", true, scr_conbrightness.value, 0, 1); M_Options_PrintSlider( " Sbar Alpha BG", true, sbar_alpha_bg.value, 0, 1); M_Options_PrintSlider( " Sbar Alpha FG", true, sbar_alpha_fg.value, 0, 1); M_Options_PrintSlider( " Screen size", true, scr_viewsize.value, 30, 120); diff --git a/screen.h b/screen.h index 3fabda69..dfdb4e56 100644 --- a/screen.h +++ b/screen.h @@ -43,6 +43,7 @@ extern cvar_t crosshair_size; extern cvar_t crosshair_static; extern cvar_t scr_conalpha; +extern cvar_t scr_conbrightness; extern cvar_t r_letterbox; #endif