-// Engine info panel (#13)
+#include "engineinfo.qh"
+
+#include <client/draw.qh>
+
+// Engine info (#13)
+
+void HUD_EngineInfo_Export(int fh)
+{
+ // allow saving cvars that aesthetically change the panel into hud skin files
+}
float prevfps;
float prevfps_time;
if(!autocvar_hud_panel_engineinfo) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
- HUD_Panel_DrawBg(1);
+ if (autocvar_hud_panel_engineinfo_dynamichud)
+ HUD_Scale_Enable();
+ else
+ HUD_Scale_Disable();
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
mySize -= '2 2 0' * panel_bg_padding;
}
- float currentTime = gettime(GETTIME_REALTIME);
+ float currentTime = gettime(GETTIME_FRAMESTART);
if(autocvar_hud_panel_engineinfo_framecounter_exponentialmovingaverage)
{
float currentframetime = currentTime - prevfps_time;
}
}
- vector color;
- color = HUD_Get_Num_Color (prevfps, 100);
+ vector color = HUD_Get_Num_Color(prevfps, 100, true);
drawstring_aspect(pos, sprintf(_("FPS: %.*f"), autocvar_hud_panel_engineinfo_framecounter_decimals, prevfps), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
}