]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a cvar to control the font size used in hud_notify (note: Still relative, not...
authorSamual <samual@xonotic.org>
Mon, 14 Feb 2011 01:16:38 +0000 (20:16 -0500)
committerSamual <samual@xonotic.org>
Mon, 14 Feb 2011 01:16:38 +0000 (20:16 -0500)
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_xhair_minimal.cfg
hud_nexuiz.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc

index a3f3ed39e51f0dd8961f77f80094f1f600986fd6..e5b998a1f6c4192509fa7c508fcd72da41d6f0e5 100644 (file)
@@ -108,6 +108,7 @@ seta hud_panel_notify_bg_alpha ""
 seta hud_panel_notify_bg_border ""
 seta hud_panel_notify_bg_padding ""
 seta hud_panel_notify_flip "0"
+seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_print "1"
 
 seta hud_panel_timer 1
index 8e39416314bdf665e1ad59b1cfaf26119ee926a5..fef69f23fd52f73104af2e0f42558d132c931852 100644 (file)
@@ -108,6 +108,7 @@ seta hud_panel_notify_bg_alpha ""
 seta hud_panel_notify_bg_border ""
 seta hud_panel_notify_bg_padding ""
 seta hud_panel_notify_flip "1"
+seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_print "0"
 
 seta hud_panel_timer 1
index 10f7afd149822e08d9b99e94521e17373d04dbf3..80fe445e48cb85ecce0e558606e43ac2b74dc14e 100644 (file)
@@ -107,6 +107,7 @@ seta hud_panel_notify_bg_alpha ""
 seta hud_panel_notify_bg_border ""
 seta hud_panel_notify_bg_padding ""
 seta hud_panel_notify_flip "1"
+seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_print "0"
 
 seta hud_panel_timer 1
index 681b7378e01fa3ce213ba3b552b2cca169f6913c..cfa50af89acb4dd8add91079c3c9cfcc7a886954 100644 (file)
@@ -108,6 +108,7 @@ seta hud_panel_notify_bg_alpha "0"
 seta hud_panel_notify_bg_border ""
 seta hud_panel_notify_bg_padding ""
 seta hud_panel_notify_flip "0"
+seta hud_panel_notify_fontsize "1"
 seta hud_panel_notify_print "1"
 
 seta hud_panel_timer 1
index df78b4f35c3a2dda7f61af5ccef302cb7e48b09d..412ed1a7b035bf4d9f986fa665b0859cc6a7647f 100644 (file)
@@ -206,6 +206,7 @@ float autocvar_hud_panel_modicons;
 float autocvar_hud_panel_notify;
 float autocvar_hud_panel_notify_fadetime;
 float autocvar_hud_panel_notify_flip;
+float autocvar_hud_panel_notify_fontsize;
 float autocvar_hud_panel_notify_print;
 float autocvar_hud_panel_notify_time;
 float autocvar_hud_panel_powerups;
index e8309ef4e92a75cfcb633108c2471e9462b6c281..d55cfd86612c76b69034738b7bf0a7d714fe398f 100644 (file)
@@ -3142,7 +3142,8 @@ void HUD_Notify (void)
        height = mySize_y/entries;
        
        vector fontsize;
-       fontsize = '0.5 0.5 0' * height;
+       float fontheight = height * autocvar_hud_panel_notify_fontsize;
+       fontsize = '0.5 0.5 0' * fontheight;
 
        float a;
        float when;
@@ -3316,7 +3317,7 @@ void HUD_Notify (void)
                        }
                        
                        attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+                       pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
                        weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
 
                        if(s != "")
@@ -3402,8 +3403,8 @@ void HUD_Notify (void)
                        victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
 :hud_config_notifyprint
                        width_attacker = stringwidth(attacker, TRUE, fontsize);
-                       pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
-                       pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+                       pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
+                       pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
                        weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
 
                        if(s != "")