]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Add a cvar to control the font size used in hud_notify (note: Still relative, not...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index a383c355c9407cf9d9d57ece639623693c8cfa94..d55cfd86612c76b69034738b7bf0a7d714fe398f 100644 (file)
@@ -395,9 +395,9 @@ string MakeRaceString(float cp, float mytime, float histime, float lapdelta, str
        if(histime < 0)
                return strcat(col, cpname);
        else if(hisname == "")
-               return strcat(col, sprintf(_("%s (%s)")), cpname, timestr);
+               return strcat(col, sprintf(_("%s (%s)"), cpname, timestr));
        else
-               return strcat(col, sprintf(_("%s (%s %s)")), cpname, timestr, strcat(hisname, col, lapstr));
+               return strcat(col, sprintf(_("%s (%s %s)"), cpname, timestr, strcat(hisname, col, lapstr)));
 }
 
 // Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
@@ -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 != "")