]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/notify.qc
Merge branch 'master' into martin-t/damagetext
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / notify.qc
index 1f0e26b9a5e7274f8559ab7c402e6d619519e478..fda57026f742826def39e7f8b393499097697f2f 100644 (file)
@@ -1,5 +1,7 @@
 #include "notify.qh"
-// Notification area (#4)
+
+
+// Notifications (#4)
 
 void HUD_Notify_Push(string icon, string attacker, string victim)
 {
@@ -47,8 +49,13 @@ void HUD_Notify()
                if (!autocvar_hud_panel_notify)
                        return;
 
-       HUD_Panel_UpdateCvars();
-       HUD_Panel_DrawBg(1);
+       HUD_Panel_LoadCvars();
+
+       if (autocvar_hud_panel_notify_dynamichud)
+               HUD_Scale_Enable();
+       else
+               HUD_Scale_Disable();
+       HUD_Panel_DrawBg();
 
        if (!autocvar__hud_configure)
                if (notify_count == 0)
@@ -138,13 +145,13 @@ void HUD_Notify()
                        icon_pos = pos + icon_left + eY * i * entry_height;
                        drawpic_aspect_skin(icon_pos, icon, icon_size, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
 
-                       victim = textShortenToWidth(victim, name_maxwidth, font_size, stringwidth_colors);
+                       victim = textShortenToWidth(ColorTranslateRGB(victim), name_maxwidth, font_size, stringwidth_colors);
                        victim_pos = pos + victim_left + name_top;
                        drawcolorcodedstring(victim_pos, victim, font_size, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
 
                        if (attacker != "")
                        {
-                               attacker = textShortenToWidth(attacker, name_maxwidth, font_size, stringwidth_colors);
+                               attacker = textShortenToWidth(ColorTranslateRGB(attacker), name_maxwidth, font_size, stringwidth_colors);
                                attacker_pos = pos + attacker_right - eX * stringwidth(attacker, true, font_size) + name_top;
                                drawcolorcodedstring(attacker_pos, attacker, font_size, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
                        }