#include "notify.qh"
+#include <client/autocvars.qh>
+#include <client/miscfunctions.qh>
// Notifications (#4)
+void HUD_Notify_Export(int fh)
+{
+ // allow saving cvars that aesthetically change the panel into hud skin files
+ HUD_Write_Cvar("hud_panel_notify_flip");
+ HUD_Write_Cvar("hud_panel_notify_fontsize");
+ HUD_Write_Cvar("hud_panel_notify_time");
+ HUD_Write_Cvar("hud_panel_notify_fadetime");
+ HUD_Write_Cvar("hud_panel_notify_icon_aspect");
+}
+
void HUD_Notify_Push(string icon, string attacker, string victim)
{
if (icon == "")
float name_maxwidth = panel_width_half - icon_width_half - size.x * NOTIFY_ICON_MARGIN;
vector font_size = '0.5 0.5 0' * entry_height * autocvar_hud_panel_notify_fontsize;
- vector icon_size = (eX * icon_aspect + eY) * entry_height;
+ vector icon_size = vec2(icon_aspect, 1) * entry_height;
vector icon_left = eX * (panel_width_half - icon_width_half);
vector attacker_right = eX * name_maxwidth;
vector victim_left = eX * (size.x - name_maxwidth);
{
attacker = sprintf(_("Player %d"), count + 1);
victim = sprintf(_("Player %d"), count + 2);
- icon = Weapons_from(min(WEP_FIRST + count * 2, WEP_LAST)).model2;
+ icon = REGISTRY_GET(Weapons, min(WEP_FIRST + count * 2, WEP_LAST)).model2;
alpha = bound(0, 1.2 - count / entry_count, 1);
}
else