]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
conback lives... again!
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 Apr 2006 06:28:17 +0000 (06:28 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 Apr 2006 06:28:17 +0000 (06:28 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6305 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
console.c
menu.c
screen.h

index b37f82c93d8ea626cfa20db69c25318658d9f158..4f5c56faf9ddc8e6f9d6e1b2a91ed5dce51d78e2 100644 (file)
@@ -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);
index c3c2d667c860073f96eea53982475a678249ac19..80e144622213c4689495f79d3b20e6da920baf90 100644 (file)
--- 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 6ffb2c90e3ce5969ecab9912bfa3935992a0b6ee..19f63f677e2b8ef4dc3aa89c5a0614354f1ff99c 100644 (file)
--- 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);
index 3fabda69db9f4993101a129a490316be2c7afc74..dfdb4e56a63344de90e75094f7c7af0285681396 100644 (file)
--- 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