Port more scoreboard cvars to the hud skins
authorterencehill <piuntn@gmail.com>
Thu, 4 Aug 2016 23:17:55 +0000 (01:17 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 4 Aug 2016 23:17:55 +0000 (01:17 +0200)
_hud_common.cfg
_hud_descriptions.cfg
defaultXonotic.cfg
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud/panel/scoreboard.qc

index bc82ac1..a89d3c6 100644 (file)
@@ -45,6 +45,7 @@ seta hud_panel_centerprint      1 "enable this panel"
 seta hud_panel_itemstime        2 "enable this panel, 1 = show when spectating, 2 = even playing in warmup stage"
 //seta hud_panel_quickmenu        1 "enable this panel"
 //seta hud_panel_scoreboard       1 "enable this panel"
+seta hud_panel_scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
 
 seta hud_panel_weapons_dynamichud          1 "apply the dynamic hud effects to this panel"
 seta hud_panel_ammo_dynamichud             1 "apply the dynamic hud effects to this panel"
@@ -63,6 +64,7 @@ seta hud_panel_infomessages_dynamichud     0 "apply the dynamic hud effects to t
 seta hud_panel_physics_dynamichud          1 "apply the dynamic hud effects to this panel"
 seta hud_panel_centerprint_dynamichud      1 "apply the dynamic hud effects to this panel"
 seta hud_panel_itemstime_dynamichud        1 "apply the dynamic hud effects to this panel"
+seta hud_panel_scoreboard_dynamichud       0 "apply the dynamic hud effects to this panel"
 
 seta hud_panel_weapons_ammo_full_shells 60 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_nails 320 "show 100% of the status bar at this ammo count"
index eb1e534..bfd9949 100644 (file)
@@ -364,9 +364,15 @@ seta hud_panel_scoreboard_bg_color_team "" "override panel color with team color
 seta hud_panel_scoreboard_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
 seta hud_panel_scoreboard_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_scoreboard_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_panel_scoreboard_fadeinspeed "" "speed at which scoreboard fades in, higher is faster (0 = instant)"
+seta hud_panel_scoreboard_fadeoutspeed "" "speed at which scoreboard fades out, higher is faster (0 = instant)"
+seta hud_panel_scoreboard_respawntime_decimals "" "decimal places to show for the respawntime countdown display on the scoreboard"
 seta hud_panel_scoreboard_table_bg_alpha "" "background alpha of a scoreboard table"
+seta hud_panel_scoreboard_table_bg_scale "" "scale for the tiled scoreboard background"
 seta hud_panel_scoreboard_table_fg_alpha "" "foreground alpha of a scoreboard table"
 seta hud_panel_scoreboard_table_fg_alpha_self "" "self foreground alpha of a scoreboard table"
 seta hud_panel_scoreboard_table_highlight "" "enable highlighting for rows and columns in scoreboard tables"
 seta hud_panel_scoreboard_table_highlight_alpha "" "highlight alpha of a scoreboard table"
-seta hud_panel_scoreboard_table_highlight_alpha_self "" "self highlight alpha of a scoreboard table"
\ No newline at end of file
+seta hud_panel_scoreboard_table_highlight_alpha_self "" "self highlight alpha of a scoreboard table"
+seta hud_panel_scoreboard_accuracy_doublerows "" "use two rows instead of one"
+seta hud_panel_scoreboard_accuracy_nocolors "" "don't use colors displaying accuracy stats"
index 8d85453..499170e 100644 (file)
@@ -834,14 +834,6 @@ seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info pr
 seta scoreboard_columns default
 seta scoreboard_border_thickness 1 "scoreboard border thickness"
 seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
-seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
-seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
-seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
-seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
-seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
-seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
-seta scoreboard_respawntime_decimals 1 "decimal places to show for the respawntime countdown display on the scoreboard"
-seta scoreboard_dynamichud 0 "apply the dynamic hud effects to the scoreboard"
 
 seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
 seta accuracy_color0 "1 0 0"
index 2be5762..27f12b2 100644 (file)
@@ -365,11 +365,17 @@ seta hud_panel_scoreboard_bg_color_team ""
 seta hud_panel_scoreboard_bg_alpha "0.7"
 seta hud_panel_scoreboard_bg_border ""
 seta hud_panel_scoreboard_bg_padding ""
+seta hud_panel_scoreboard_fadeinspeed "10"
+seta hud_panel_scoreboard_fadeoutspeed "5"
+seta hud_panel_scoreboard_respawntime_decimals "1"
 seta hud_panel_scoreboard_table_bg_alpha "0"
+seta hud_panel_scoreboard_table_bg_scale "0.25"
 seta hud_panel_scoreboard_table_fg_alpha "0.9"
 seta hud_panel_scoreboard_table_fg_alpha_self "1"
 seta hud_panel_scoreboard_table_highlight "1"
 seta hud_panel_scoreboard_table_highlight_alpha "0.2"
 seta hud_panel_scoreboard_table_highlight_alpha_self "0.5"
+seta hud_panel_scoreboard_accuracy_doublerows "0"
+seta hud_panel_scoreboard_accuracy_nocolors "0"
 
 menu_sync
index 3fd76d5..2c860d3 100644 (file)
@@ -365,11 +365,17 @@ seta hud_panel_scoreboard_bg_color_team "0.7"
 seta hud_panel_scoreboard_bg_alpha "0.7"
 seta hud_panel_scoreboard_bg_border ""
 seta hud_panel_scoreboard_bg_padding ""
+seta hud_panel_scoreboard_fadeinspeed "10"
+seta hud_panel_scoreboard_fadeoutspeed "5"
+seta hud_panel_scoreboard_respawntime_decimals "1"
 seta hud_panel_scoreboard_table_bg_alpha "0.8"
+seta hud_panel_scoreboard_table_bg_scale "0.25"
 seta hud_panel_scoreboard_table_fg_alpha "0.9"
 seta hud_panel_scoreboard_table_fg_alpha_self "1"
 seta hud_panel_scoreboard_table_highlight "1"
 seta hud_panel_scoreboard_table_highlight_alpha "0.08"
 seta hud_panel_scoreboard_table_highlight_alpha_self "0.3"
+seta hud_panel_scoreboard_accuracy_doublerows "1"
+seta hud_panel_scoreboard_accuracy_nocolors "0"
 
 menu_sync
index ca5dd51..e7f06a5 100644 (file)
@@ -365,11 +365,17 @@ seta hud_panel_scoreboard_bg_color_team ""
 seta hud_panel_scoreboard_bg_alpha ""
 seta hud_panel_scoreboard_bg_border ""
 seta hud_panel_scoreboard_bg_padding ""
+seta hud_panel_scoreboard_fadeinspeed "10"
+seta hud_panel_scoreboard_fadeoutspeed "5"
+seta hud_panel_scoreboard_respawntime_decimals "1"
 seta hud_panel_scoreboard_table_bg_alpha "0.8"
+seta hud_panel_scoreboard_table_bg_scale "0.25"
 seta hud_panel_scoreboard_table_fg_alpha "0.9"
 seta hud_panel_scoreboard_table_fg_alpha_self "1"
 seta hud_panel_scoreboard_table_highlight "1"
 seta hud_panel_scoreboard_table_highlight_alpha "0.08"
 seta hud_panel_scoreboard_table_highlight_alpha_self "0.3"
+seta hud_panel_scoreboard_accuracy_doublerows "1"
+seta hud_panel_scoreboard_accuracy_nocolors "0"
 
 menu_sync
index 8757c95..df80196 100644 (file)
@@ -365,11 +365,17 @@ seta hud_panel_scoreboard_bg_color_team ""
 seta hud_panel_scoreboard_bg_alpha ""
 seta hud_panel_scoreboard_bg_border ""
 seta hud_panel_scoreboard_bg_padding ""
+seta hud_panel_scoreboard_fadeinspeed "10"
+seta hud_panel_scoreboard_fadeoutspeed "5"
+seta hud_panel_scoreboard_respawntime_decimals "1"
 seta hud_panel_scoreboard_table_bg_alpha "0.8"
+seta hud_panel_scoreboard_table_bg_scale "0.25"
 seta hud_panel_scoreboard_table_fg_alpha "0.9"
 seta hud_panel_scoreboard_table_fg_alpha_self "1"
 seta hud_panel_scoreboard_table_highlight "1"
 seta hud_panel_scoreboard_table_highlight_alpha "0.08"
 seta hud_panel_scoreboard_table_highlight_alpha_self "0.3"
+seta hud_panel_scoreboard_accuracy_doublerows "1"
+seta hud_panel_scoreboard_accuracy_nocolors "0"
 
 menu_sync
index 28988de..3e2b0bb 100644 (file)
@@ -365,11 +365,17 @@ seta hud_panel_scoreboard_bg_color_team ""
 seta hud_panel_scoreboard_bg_alpha ""
 seta hud_panel_scoreboard_bg_border ""
 seta hud_panel_scoreboard_bg_padding ""
+seta hud_panel_scoreboard_fadeinspeed "10"
+seta hud_panel_scoreboard_fadeoutspeed "5"
+seta hud_panel_scoreboard_respawntime_decimals "1"
 seta hud_panel_scoreboard_table_bg_alpha "0.8"
+seta hud_panel_scoreboard_table_bg_scale "0.25"
 seta hud_panel_scoreboard_table_fg_alpha "0.9"
 seta hud_panel_scoreboard_table_fg_alpha_self "1"
 seta hud_panel_scoreboard_table_highlight "1"
 seta hud_panel_scoreboard_table_highlight_alpha "0.08"
 seta hud_panel_scoreboard_table_highlight_alpha_self "0.3"
+seta hud_panel_scoreboard_accuracy_doublerows "1"
+seta hud_panel_scoreboard_accuracy_nocolors "0"
 
 menu_sync
index 06f8dc7..037e6ae 100644 (file)
@@ -365,11 +365,17 @@ seta hud_panel_scoreboard_bg_color_team ""
 seta hud_panel_scoreboard_bg_alpha ""
 seta hud_panel_scoreboard_bg_border ""
 seta hud_panel_scoreboard_bg_padding ""
+seta hud_panel_scoreboard_fadeinspeed "10"
+seta hud_panel_scoreboard_fadeoutspeed "5"
+seta hud_panel_scoreboard_respawntime_decimals "1"
 seta hud_panel_scoreboard_table_bg_alpha "0.8"
+seta hud_panel_scoreboard_table_bg_scale "0.25"
 seta hud_panel_scoreboard_table_fg_alpha "0.9"
 seta hud_panel_scoreboard_table_fg_alpha_self "1"
 seta hud_panel_scoreboard_table_highlight "1"
 seta hud_panel_scoreboard_table_highlight_alpha "0.1"
 seta hud_panel_scoreboard_table_highlight_alpha_self "0.25"
+seta hud_panel_scoreboard_accuracy_doublerows "1"
+seta hud_panel_scoreboard_accuracy_nocolors "0"
 
 menu_sync
index c0a1202..e3cf7ce 100644 (file)
@@ -395,16 +395,8 @@ float autocvar_r_drawviewmodel;
 int autocvar_r_fakelight;
 int autocvar_r_fullbright;
 float autocvar_r_letterbox;
-bool autocvar_scoreboard_accuracy;
-bool autocvar_scoreboard_accuracy_doublerows;
-bool autocvar_scoreboard_accuracy_nocolors;
-float autocvar_scoreboard_bg_scale;
 float autocvar_scoreboard_border_thickness;
 string autocvar_scoreboard_columns;
-float autocvar_scoreboard_fadeinspeed = 10;
-float autocvar_scoreboard_fadeoutspeed = 5;
-float autocvar_scoreboard_respawntime_decimals;
-bool autocvar_scoreboard_dynamichud = false;
 bool autocvar_v_flipped;
 float autocvar_vid_conheight;
 float autocvar_vid_conwidth;
index c2c2d26..216371d 100644 (file)
@@ -15,13 +15,23 @@ bool sbt_highlight;
 float sbt_highlight_alpha;
 float sbt_highlight_alpha_self;
 
-// TODO init autocvars
-float autocvar_hud_panel_scoreboard_table_bg_alpha;
-float autocvar_hud_panel_scoreboard_table_fg_alpha;
-float autocvar_hud_panel_scoreboard_table_fg_alpha_self;
-bool autocvar_hud_panel_scoreboard_table_highlight;
-float autocvar_hud_panel_scoreboard_table_highlight_alpha;
-float autocvar_hud_panel_scoreboard_table_highlight_alpha_self;
+float autocvar_hud_panel_scoreboard_fadeinspeed = 10;
+float autocvar_hud_panel_scoreboard_fadeoutspeed = 5;
+float autocvar_hud_panel_scoreboard_respawntime_decimals = 1;
+float autocvar_hud_panel_scoreboard_table_bg_alpha = 0.7;
+float autocvar_hud_panel_scoreboard_table_bg_scale = 0.25;
+float autocvar_hud_panel_scoreboard_table_fg_alpha = 0.9;
+float autocvar_hud_panel_scoreboard_table_fg_alpha_self = 1;
+bool autocvar_hud_panel_scoreboard_table_highlight = true;
+float autocvar_hud_panel_scoreboard_table_highlight_alpha = 0.2;
+float autocvar_hud_panel_scoreboard_table_highlight_alpha_self = 0.5;
+
+bool autocvar_hud_panel_scoreboard_accuracy = true;
+bool autocvar_hud_panel_scoreboard_accuracy_doublerows = false;
+bool autocvar_hud_panel_scoreboard_accuracy_nocolors = false;
+
+bool autocvar_hud_panel_scoreboard_dynamichud = false;
+
 
 void drawstringright(vector, string, vector, vector, float, float);
 void drawstringcenter(vector, string, vector, vector, float, float);
@@ -987,7 +997,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        if (weapon_cnt <= 0) return pos;
 
        int rows = 1;
-       if (autocvar_scoreboard_accuracy_doublerows && weapon_cnt >= floor((Weapons_COUNT - 1) * 0.5))
+       if (autocvar_hud_panel_scoreboard_accuracy_doublerows && weapon_cnt >= floor((Weapons_COUNT - 1) * 0.5))
                rows = 2;
        int columnns = ceil(weapon_cnt / rows);
 
@@ -1037,7 +1047,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        if (rows == 2)
                pos.x += weapon_width / 2;
 
-       if (autocvar_scoreboard_accuracy_nocolors)
+       if (autocvar_hud_panel_scoreboard_accuracy_nocolors)
                rgb = '1 1 1';
        else
                Accuracy_LoadColors();
@@ -1072,7 +1082,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        float padding;
                        padding = (weapon_width - stringwidth(s, false, eX * fontsize)) / 2; // center the accuracy value
 
-                       if(!autocvar_scoreboard_accuracy_nocolors)
+                       if(!autocvar_hud_panel_scoreboard_accuracy_nocolors)
                                rgb = Accuracy_GetColor(weapon_stats);
 
                        drawstring(tmpos + eX * padding + eY * weapon_height, s, '1 1 0' * fontsize, rgb, sbt_fg_alpha, DRAWFLAG_NORMAL);
@@ -1250,14 +1260,14 @@ void HUD_DrawScoreboard()
                if(hud_woulddrawscoreboard) {
                        if(menu_enabled == 1)
                                scoreboard_fade_alpha = 1;
-                       float scoreboard_fadeinspeed = autocvar_scoreboard_fadeinspeed;
+                       float scoreboard_fadeinspeed = autocvar_hud_panel_scoreboard_fadeinspeed;
                        if (scoreboard_fadeinspeed)
                                scoreboard_fade_alpha = bound (0, (time - hud_woulddrawscoreboard_change) * scoreboard_fadeinspeed, 1);
                        else
                                scoreboard_fade_alpha = 1;
                }
                else {
-                       float scoreboard_fadeoutspeed = autocvar_scoreboard_fadeoutspeed;
+                       float scoreboard_fadeoutspeed = autocvar_hud_panel_scoreboard_fadeoutspeed;
                        if (scoreboard_fadeoutspeed)
                                scoreboard_fade_alpha = bound (0, (1/scoreboard_fadeoutspeed - (time - hud_woulddrawscoreboard_change)) * scoreboard_fadeoutspeed, 1);
                        else
@@ -1270,7 +1280,7 @@ void HUD_DrawScoreboard()
        else
                scoreboard_fade_alpha = 0;
 
-       if (autocvar_scoreboard_dynamichud)
+       if (autocvar_hud_panel_scoreboard_dynamichud)
                HUD_Scale_Enable();
        else
                HUD_Scale_Disable();
@@ -1315,7 +1325,10 @@ void HUD_DrawScoreboard()
        pos.y += panel_bg_border;
 
        // Draw the scoreboard
-       vector bg_size = draw_getimagesize("gfx/scoreboard/scoreboard_bg") * ((autocvar_scoreboard_bg_scale > 0) ? autocvar_scoreboard_bg_scale : 0.25);
+       float scale = autocvar_hud_panel_scoreboard_table_bg_scale;
+       if(scale <= 0)
+               scale = 0.25;
+       vector bg_size = draw_getimagesize("gfx/scoreboard/scoreboard_bg") * scale;
 
        if(teamplay)
        {
@@ -1368,9 +1381,8 @@ void HUD_DrawScoreboard()
                }
                pos = HUD_DrawScoreboardRankings(pos, playerslots[player_localnum], panel_bg_color, bg_size);
        }
-       else if (autocvar_scoreboard_accuracy && !warmup_stage && gametype != MAPINFO_TYPE_NEXBALL) {
+       else if (autocvar_hud_panel_scoreboard_accuracy && !warmup_stage && gametype != MAPINFO_TYPE_NEXBALL)
                pos = HUD_DrawScoreboardAccuracyStats(pos, panel_bg_color, bg_size);
-       }
 
        pos = HUD_DrawMapStats(pos, panel_bg_color, bg_size);
 
@@ -1464,8 +1476,8 @@ void HUD_DrawScoreboard()
                        respawn_time = max(time, respawn_time); // don't show a negative value while the server is respawning the player (lag)
 
                        str = sprintf(_("^1Respawning in ^3%s^1..."),
-                               (autocvar_scoreboard_respawntime_decimals ?
-                                       count_seconds_decs(respawn_time - time, autocvar_scoreboard_respawntime_decimals)
+                               (autocvar_hud_panel_scoreboard_respawntime_decimals ?
+                                       count_seconds_decs(respawn_time - time, autocvar_hud_panel_scoreboard_respawntime_decimals)
                                        :
                                        count_seconds(respawn_time - time)
                                )
@@ -1474,8 +1486,8 @@ void HUD_DrawScoreboard()
                else if(time < respawn_time)
                {
                        str = sprintf(_("You are dead, wait ^3%s^7 before respawning"),
-                               (autocvar_scoreboard_respawntime_decimals ?
-                                       count_seconds_decs(respawn_time - time, autocvar_scoreboard_respawntime_decimals)
+                               (autocvar_hud_panel_scoreboard_respawntime_decimals ?
+                                       count_seconds_decs(respawn_time - time, autocvar_hud_panel_scoreboard_respawntime_decimals)
                                        :
                                        count_seconds(respawn_time - time)
                                )