]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow customizing the minimum width of the scoreboard
authorterencehill <piuntn@gmail.com>
Thu, 8 Sep 2016 15:54:51 +0000 (17:54 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 8 Sep 2016 15:54:51 +0000 (17:54 +0200)
_hud_common.cfg
qcsrc/client/hud/panel/scoreboard.qc

index 20e188f8750808de84aa5f936dc4bfab36e0202a..3e120e92cbe82bd5c7f2acc7c58a4f7150233076 100644 (file)
@@ -107,10 +107,11 @@ seta hud_panel_infomessages_group0 1 "show group 0 messages (showing keys for no
 seta hud_panel_infomessages_group_time 6 "number of seconds a message of a group lasts before it gets changed"
 seta hud_panel_infomessages_group_fadetime 0.4 "group message fade in/out time"
 
-seta hud_panel_scoreboard_namesize "15" "size limit of player names and relative column (multiplied by fontsize)"
+seta hud_panel_scoreboard_namesize 15 "size limit of player names and relative column (multiplied by fontsize)"
 seta hud_panel_scoreboard_maxheight 0.5 "max height of the scoreboard; a few players that wouldn't fit into the scoreboard are listed in the last row"
 seta hud_panel_scoreboard_others_showscore 1 "show scores of players listed in the last row when the scoreboard reaches the max height"
 seta hud_panel_scoreboard_spectators_showping 1 "show ping of spectators"
+seta hud_panel_scoreboard_minwidth 0.4 "minimum width of the scoreboard"
 
 // hud panel aliases
 alias quickmenu "cl_cmd hud quickmenu ${* ?}"
index 222e4e32bf2f6c9fb96e8f40d2f56e59df36ec47..c6df590b41ce3fd9111f50c120c7f94e602c41af 100644 (file)
@@ -58,9 +58,10 @@ bool autocvar_hud_panel_scoreboard_accuracy_nocolors = false;
 
 bool autocvar_hud_panel_scoreboard_dynamichud = false;
 
-bool autocvar_hud_panel_scoreboard_maxheight = 0.5;
+float autocvar_hud_panel_scoreboard_maxheight = 0.5;
 bool autocvar_hud_panel_scoreboard_others_showscore = true;
 bool autocvar_hud_panel_scoreboard_spectators_showping = true;
+float autocvar_hud_panel_scoreboard_minwidth = 0.4;
 
 
 void drawstringright(vector, string, vector, vector, float, float);
@@ -1449,7 +1450,7 @@ void Scoreboard_Draw()
                panel_pos.y = max((autocvar_con_notify * autocvar_con_notifysize), panel_pos.y);
 
        float excess = max(0, max_namesize - autocvar_hud_panel_scoreboard_namesize * hud_fontsize.x);
-       float fixed_scoreboard_width = bound(vid_conwidth * 0.4, vid_conwidth - excess, vid_conwidth * 0.93);
+       float fixed_scoreboard_width = bound(vid_conwidth * autocvar_hud_panel_scoreboard_minwidth, vid_conwidth - excess, vid_conwidth * 0.93);
        panel_pos.x = 0.5 * (vid_conwidth - fixed_scoreboard_width);
        panel_size.x = fixed_scoreboard_width;