]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
s/hud_border_thickness/autocvar_scoreboard_border_thickness/
authorFruitieX <rasse@rasse-laptop.(none)>
Thu, 21 Oct 2010 19:21:39 +0000 (22:21 +0300)
committerFruitieX <rasse@rasse-laptop.(none)>
Thu, 21 Oct 2010 19:21:39 +0000 (22:21 +0300)
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/mapvoting.qc
qcsrc/client/scoreboard.qc

index 5e724442b7a316ea17cd0278d0fd23015d0740d5..a98b70683ab62b05760434e58efbde9961a25747 100644 (file)
@@ -234,3 +234,5 @@ var string autocvar_hud_panel_infomessages_bg_alpha;
 var string autocvar_hud_panel_infomessages_bg_border;
 var string autocvar_hud_panel_infomessages_bg_padding;
 var float autocvar_hud_panel_infomessages_flip;
+
+var float autocvar_scoreboard_border_thickness;
index e862fe10a4f611d7b67aee17dac748936651e977..7f5c8442920ca0336afd92d08aff2955187e0279 100644 (file)
@@ -4915,9 +4915,6 @@ void HUD_Main (void)
        else if(autocvar__menu_alpha == 0 && scoreboard_fade_alpha == 0)
                hud_fade_alpha = 1;
 
-       hud_border_thickness = bound(0, cvar("hud_border_thickness"), 5);
-       hud_accuracy_border_thickness = bound(0, cvar_or("hud_accuracy_border_thickness", 1), 5);
-
        hud_fontsize = HUD_GetFontsize("hud_fontsize");
 
        if(!autocvar__hud_configure && !hud_fade_alpha)
index 9e41d0b25e52944357e401cbe01992f5b4fc3e7a..5e9d59b6ef29e1c0853e81f2d0dddf56ef12148c 100644 (file)
@@ -37,8 +37,6 @@ float weapontime;
 float weaponprevtime;
 
 float teamnagger;
-float hud_border_thickness;
-float hud_accuracy_border_thickness;
 
 float hud_configure_checkcollisions;
 float hud_configure_prev;
index 18e0ce1a251b6f7d5cd082e3959dcb7c4f5c7bf8..40fcfda11cda44efbbf29b787f599be41c069489 100644 (file)
@@ -71,8 +71,8 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        pos_x = pos_x + text_size*0.5 - img_size_x*0.5;
        pos_y = pos_y - img_size_y;
 
-       pos += hud_border_thickness * '1 1 0';
-       img_size -= (hud_border_thickness * 2) * '1 1 0';
+       pos += autocvar_scoreboard_border_thickness * '1 1 0';
+       img_size -= (autocvar_scoreboard_border_thickness * 2) * '1 1 0';
        if(pic == "")
        {
                drawfill(pos, img_size, '.5 .5 .5', .7, DRAWFLAG_NORMAL);
@@ -83,9 +83,9 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        }
 
        if(id == mv_ownvote)
-               drawborderlines(hud_border_thickness, pos, img_size, rgb, 1, DRAWFLAG_NORMAL);
+               drawborderlines(autocvar_scoreboard_border_thickness, pos, img_size, rgb, 1, DRAWFLAG_NORMAL);
        else
-               drawborderlines(hud_border_thickness, pos, img_size, '0 0 0', 1, DRAWFLAG_NORMAL);
+               drawborderlines(autocvar_scoreboard_border_thickness, pos, img_size, '0 0 0', 1, DRAWFLAG_NORMAL);
 
        if(id == mv_selection)
                drawfill(pos, img_size, '1 1 1', 0.1, DRAWFLAG_NORMAL);
index 9e07eed7e2d59b13cfdfeb20d7d0b259a1cd2ffd..4000f30a70e00e8ec5792b7994a7746a2eea2b5e 100644 (file)
@@ -766,16 +766,16 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, rgb + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
        // table border
-       tmp_y += hud_border_thickness;
+       tmp_y += autocvar_scoreboard_border_thickness;
        tmp_y += body_table_height;
-       drawborderlines(hud_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL); // more transparency for the scoreboard
+       drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL); // more transparency for the scoreboard
 
        // separator header/table
        pos_y += 1.25 * hud_fontsize_y;
-       tmp_y = hud_border_thickness;
+       tmp_y = autocvar_scoreboard_border_thickness;
        drawfill(pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
-       pos_y += hud_border_thickness;
+       pos_y += autocvar_scoreboard_border_thickness;
 
        // table background
        tmp_y = body_table_height;
@@ -789,14 +789,14 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        // go back to the top to make alternated columns highlighting and to print the strings
        pos_y -= 1.25 * hud_fontsize_y;
-       pos_y -= hud_border_thickness;
+       pos_y -= autocvar_scoreboard_border_thickness;
 
        pos += '1 1 0';
 
        if (scoreboard_highlight)
        {
                column_dim_y = 1.25 * hud_fontsize_y; // header
-               column_dim_y += hud_border_thickness;
+               column_dim_y += autocvar_scoreboard_border_thickness;
                column_dim_y += body_table_height;
        }
 
@@ -846,7 +846,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        pos_x = xmin;
        pos_y += 1.25 * hud_fontsize_y; // skip the header
-       pos_y += hud_border_thickness;
+       pos_y += autocvar_scoreboard_border_thickness;
 
        // fill the table and draw the rows
        i = 0;
@@ -917,7 +917,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        else
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-       drawborderlines(hud_accuracy_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
+       drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
 
        // column highlighting
        for(i = 0; i < weapon_cnt/rows; ++i)
@@ -1050,7 +1050,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        else
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-       drawborderlines(hud_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
+       drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
 
        // row highlighting
        for(i = 0; i<RANKINGS_RECEIVED_CNT; ++i)
@@ -1394,7 +1394,7 @@ void HUD_DrawAccuracyStats()
 
                                // background
                                drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-                               drawborderlines(hud_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+                               drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
                                // the weapon
                                drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
@@ -1444,7 +1444,7 @@ void HUD_DrawAccuracyStats()
 
                                // background
                                drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-                               drawborderlines(hud_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+                               drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
                                // the weapon
                                drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);