]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/hud.qh
Improve spect HUD CVAR names
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qh
index 4a1eea2400d2b7e038a0ed36ab34a9c3ced8357b..79c4edd41a83ae7a16f28db3b6ed49b779c78751 100644 (file)
@@ -9,6 +9,18 @@ void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
 void draw_cursor_normal(vector pos, vector col, float a);
 void LoadMenuSkinValues();
 
+void HUD_Scale_Disable();
+void HUD_Scale_Enable();
+
+#define HUD_ScaleX(f) (f * hud_scale.x)
+#define HUD_ScaleY(f) (f * hud_scale.y)
+#define HUD_ShiftX(f) (f + hud_shift.x + hud_shift.z * (f - hud_scale_center.x))
+#define HUD_ShiftY(f) (f + hud_shift.y + hud_shift.z * (f - hud_scale_center.y))
+vector HUD_Scale(vector v);
+vector HUD_Shift(vector v);
+
+vector HUD_GetFontsize(string cvarname);
+
 void Hud_Dynamic_Frame();
 
 bool HUD_Radar_Clickable();
@@ -110,6 +122,7 @@ int ts_primary, ts_secondary;
 float weapontime;
 float weaponprevtime;
 
+float timer;
 float teamnagger;
 
 int hudShiftState;
@@ -170,6 +183,26 @@ float chat_sizey;
 
 float current_player;
 
+float autocvar__menu_alpha; // updated by the menu VM, useful to tell when the menu is being drawn
+
+string autocvar__hud_panelorder;
+
+bool autocvar_hud_cursormode = true;
+string autocvar_hud_dock;
+float autocvar_hud_dock_alpha;
+string autocvar_hud_dock_color;
+bool autocvar_hud_dock_color_team;
+string autocvar_hud_panel_bg;
+float autocvar_hud_panel_bg_alpha;
+float autocvar_hud_panel_bg_border;
+vector autocvar_hud_panel_bg_color;
+float autocvar_hud_panel_bg_color_team;
+float autocvar_hud_panel_bg_padding;
+float autocvar_hud_panel_fg_alpha;
+string autocvar_hud_skin;
+float autocvar_hud_progressbar_alpha;
+float autocvar_hud_panel_update_interval;
+
 float autocvar_hud_dynamic_follow;
 float autocvar_hud_dynamic_follow_scale;
 vector autocvar_hud_dynamic_follow_scale_xyz;
@@ -178,6 +211,9 @@ vector hud_dynamic_shake_realofs;
 float hud_dynamic_shake_factor;
 float hud_dynamic_shake_time;
 
+bool autocvar_hud_panel_spect_scores = true; //LegendGuard adds a bool to enable/disable score display HUD 06-04-2021
+bool autocvar_hud_panel_spect_playername = true; //LegendGuard adds a bool to enable/disable player name display HUD 06-04-2021
+
 // shared across viewmodel effects and dynamic hud code
 vector cl_followmodel_ofs;
 float cl_followmodel_time;
@@ -242,6 +278,7 @@ REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      PANEL_CONFIG_MAIN | PANE
 REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      PANEL_CONFIG_MAIN                        , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // QUICKMENU
 REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
 REGISTER_HUD_PANEL(STRAFEHUD,       HUD_StrafeHUD,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // STRAFEHUD
+REGISTER_HUD_PANEL(SPECTHUD,        HUD_SpectHUD,       PANEL_CONFIG_NO | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME) // SPECTHUD
 // always add new panels to the end of list
 
 // Because calling lots of functions in QC apparently cuts fps in half on many machines: