float autocvar_hud_panel_update_interval;
bool autocvar_hud_panel_vote;
float autocvar_hud_panel_vote_alreadyvoted_alpha;
-string autocvar_hud_panel_vote_bg_alpha;
bool autocvar_hud_panel_weapons;
bool autocvar_hud_panel_weapons_accuracy;
bool autocvar_hud_panel_weapons_ammo;
float uid2name_dialog;
+float gameover_time;
+
.bool csqcmodel_isdead; // used by shownames and miscfunctions (entcs_IsDead) to know when a player is dead
#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
#include "hud.qh"
#include "panel/scoreboard.qh"
-
#include "hud_config.qh"
#include "../mapvoting.qh"
#include "../teamradar.qh"
bool HUD_Minigame_Showpanels();
-bool HUD_Panel_CheckFlags(int showflags)
-{
- TC(int, showflags);
- if ( HUD_Minigame_Showpanels() )
- return showflags & PANEL_SHOW_MINIGAME;
- if(intermission == 2)
- return showflags & PANEL_SHOW_MAPVOTE;
- return showflags & PANEL_SHOW_MAINGAME;
-}
-
void HUD_Panel_Draw(entity panent)
{
panel = panent;
- if(autocvar__hud_configure)
+ if (autocvar__hud_configure)
+ {
+ if (!(panel.panel_configflags & PANEL_CONFIG_MAIN))
+ return;
+ panel_fade_alpha = 1;
+ Hud_Panel_GetPanelEnabled();
+ panel.panel_draw();
+ return;
+ }
+
+ bool draw_allowed = false;
+ if (HUD_Minigame_Showpanels())
{
- if(panel.panel_configflags & PANEL_CONFIG_MAIN)
- panel.panel_draw();
+ if (panel.panel_showflags & PANEL_SHOW_MINIGAME)
+ draw_allowed = true;
}
- else if(HUD_Panel_CheckFlags(panel.panel_showflags))
+ else if(intermission == 2)
+ {
+ if(panel.panel_showflags & PANEL_SHOW_MAPVOTE)
+ draw_allowed = true;
+ }
+ else if (panel.panel_showflags & PANEL_SHOW_MAINGAME)
+ draw_allowed = true;
+
+ if (draw_allowed)
+ {
+ if (panel.panel_showflags & PANEL_SHOW_WITH_SB)
+ panel_fade_alpha = 1;
+ else
+ {
+ panel_fade_alpha = 1 - scoreboard_fade_alpha;
+ if(!panel_fade_alpha)
+ return;
+ }
panel.panel_draw();
+ }
}
void HUD_Reset()
void HUD_Main()
{
int i;
- // global hud alpha fade (scoreboard-related panels behave differently and override it temporarly)
if(hud_configure_menu_open == 1)
hud_fade_alpha = 1;
- else if(!autocvar__hud_configure)
- hud_fade_alpha = (1 - scoreboard_fade_alpha) * (1 - autocvar__menu_alpha);
else
hud_fade_alpha = 1 - autocvar__menu_alpha;
Hud_Dynamic_Frame();
- // panels that we want to be active together with the scoreboard
- // they must fade only when the menu does
if(scoreboard_fade_alpha == 1)
- {
if(autocvar__menu_alpha == 1)
return;
- if(scoreboard_fade_alpha == 1)
- {
- HUD_Panel_Draw(HUD_PANEL(SCOREBOARD));
- HUD_Panel_Draw(HUD_PANEL(CENTERPRINT));
- return;
- }
- }
-
- if(!autocvar__hud_configure && !hud_fade_alpha)
- {
- hud_fade_alpha = 1;
- HUD_Panel_Draw(HUD_PANEL(VOTE));
- hud_fade_alpha = 0;
- return;
- }
// Drawing stuff
if (hud_skin_prev != autocvar_hud_skin)
HUD_Panel_Draw(HUD_PANEL(CHAT));
if(hud_panel_quickmenu)
HUD_Panel_Draw(HUD_PANEL(QUICKMENU));
+ HUD_Panel_Draw(HUD_PANEL(SCOREBOARD));
- if (scoreboard_active || intermission == 2)
+ if (intermission == 2)
HUD_Reset();
HUD_Configure_PostDraw();
#define HUD_PANEL(NAME) HUD_PANEL_##NAME
// draw the background/borders
-#define HUD_Panel_DrawBg(theAlpha) MACRO_BEGIN { \
+#define HUD_Panel_DrawBg() MACRO_BEGIN { \
if(panel.current_panel_bg != "0" && panel.current_panel_bg != "") \
draw_BorderPicture( \
HUD_Shift(panel_pos - '1 1 0' * panel_bg_border), \
panel.current_panel_bg, \
HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), \
- panel_bg_color, \
- panel_bg_alpha * theAlpha, \
+ panel_bg_color, panel_bg_alpha, \
HUD_Scale('1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)) \
); \
} MACRO_END
const int PANEL_SHOW_MAINGAME = 0x01;
const int PANEL_SHOW_MINIGAME = 0x02;
const int PANEL_SHOW_MAPVOTE = 0x04;
+const int PANEL_SHOW_WITH_SB = 0x08;
const int PANEL_SHOW_ALWAYS = 0xff;
-bool HUD_Panel_CheckFlags(int showflags);
.int panel_configflags;
-const int PANEL_CONFIG_NO = 0x00;
-const int PANEL_CONFIG_MAIN = 0x01;
+const int PANEL_CONFIG_NO = 0x00;
+const int PANEL_CONFIG_MAIN = 0x01;
+const int PANEL_CONFIG_CANBEOFF = 0x02; // panel can be disabled (if disabled it's displayed with a low alpha)
// prev_* vars contain the health/armor at the previous FRAME
void HUD_ItemsTime();
-REGISTER_HUD_PANEL(WEAPONS, HUD_Weapons, weapons, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(AMMO, HUD_Ammo, ammo, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(POWERUPS, HUD_Powerups, powerups, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(HEALTHARMOR, HUD_HealthArmor, healtharmor, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(NOTIFY, HUD_Notify, notify, PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
-REGISTER_HUD_PANEL(TIMER, HUD_Timer, timer, PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
-REGISTER_HUD_PANEL(RADAR, HUD_Radar, radar, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(SCORE, HUD_Score, score, PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
-REGISTER_HUD_PANEL(RACETIMER, HUD_RaceTimer, racetimer, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(VOTE, HUD_Vote, vote, PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS )
-REGISTER_HUD_PANEL(MODICONS, HUD_ModIcons, modicons, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(PRESSEDKEYS, HUD_PressedKeys, pressedkeys, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(CHAT, HUD_Chat, chat, PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS )
-REGISTER_HUD_PANEL(ENGINEINFO, HUD_EngineInfo, engineinfo, PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS )
-REGISTER_HUD_PANEL(INFOMESSAGES, HUD_InfoMessages, infomessages, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(PHYSICS, HUD_Physics, physics, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(CENTERPRINT, HUD_CenterPrint, centerprint, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(MINIGAME_BOARD, HUD_MinigameBoard, minigameboard, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME)
-REGISTER_HUD_PANEL(MINIGAME_STATUS, HUD_MinigameStatus, minigamestatus, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME)
-REGISTER_HUD_PANEL(MINIGAME_HELP, HUD_MinigameHelp, minigamehelp, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME)
-REGISTER_HUD_PANEL(MINIGAME_MENU, HUD_MinigameMenu, minigamemenu, PANEL_CONFIG_NO , PANEL_SHOW_ALWAYS )
-REGISTER_HUD_PANEL(MAPVOTE, MapVote_Draw, mapvote, PANEL_CONFIG_NO , PANEL_SHOW_MAPVOTE )
-REGISTER_HUD_PANEL(ITEMSTIME, HUD_ItemsTime, itemstime, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(QUICKMENU, HUD_QuickMenu, quickmenu, PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
-REGISTER_HUD_PANEL(SCOREBOARD, Scoreboard_Draw, scoreboard, PANEL_CONFIG_NO , PANEL_SHOW_ALWAYS )
+REGISTER_HUD_PANEL(WEAPONS, HUD_Weapons, weapons, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // WEAPONS
+REGISTER_HUD_PANEL(AMMO, HUD_Ammo, ammo, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // AMMO
+REGISTER_HUD_PANEL(POWERUPS, HUD_Powerups, powerups, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // POWERUPS
+REGISTER_HUD_PANEL(HEALTHARMOR, HUD_HealthArmor, healtharmor, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // HEALTHARMOR
+REGISTER_HUD_PANEL(NOTIFY, HUD_Notify, notify, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME ) // NOTIFY
+REGISTER_HUD_PANEL(TIMER, HUD_Timer, timer, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // TIMER
+REGISTER_HUD_PANEL(RADAR, HUD_Radar, radar, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // RADAR
+REGISTER_HUD_PANEL(SCORE, HUD_Score, score, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME ) // SCORE
+REGISTER_HUD_PANEL(RACETIMER, HUD_RaceTimer, racetimer, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // RACETIMER
+REGISTER_HUD_PANEL(VOTE, HUD_Vote, vote, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // VOTE
+REGISTER_HUD_PANEL(MODICONS, HUD_ModIcons, modicons, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_WITH_SB) // MODICONS
+REGISTER_HUD_PANEL(PRESSEDKEYS, HUD_PressedKeys, pressedkeys, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // PRESSEDKEYS
+REGISTER_HUD_PANEL(CHAT, HUD_Chat, chat, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // CHAT
+REGISTER_HUD_PANEL(ENGINEINFO, HUD_EngineInfo, engineinfo, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // ENGINEINFO
+REGISTER_HUD_PANEL(INFOMESSAGES, HUD_InfoMessages, infomessages, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // INFOMESSAGES
+REGISTER_HUD_PANEL(PHYSICS, HUD_Physics, physics, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // PHYSICS
+REGISTER_HUD_PANEL(CENTERPRINT, HUD_CenterPrint, centerprint, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_WITH_SB) // CENTERPRINT
+REGISTER_HUD_PANEL(MINIGAME_BOARD, HUD_MinigameBoard, minigameboard, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAME_BOARD
+REGISTER_HUD_PANEL(MINIGAME_STATUS, HUD_MinigameStatus, minigamestatus, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAME_STATUS
+REGISTER_HUD_PANEL(MINIGAME_HELP, HUD_MinigameHelp, minigamehelp, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAME_HELP
+REGISTER_HUD_PANEL(MINIGAME_MENU, HUD_MinigameMenu, minigamemenu, PANEL_CONFIG_NO , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // MINIGAME_MENU
+REGISTER_HUD_PANEL(MAPVOTE, MapVote_Draw, mapvote, PANEL_CONFIG_NO , PANEL_SHOW_MAPVOTE ) // MAPVOTE
+REGISTER_HUD_PANEL(ITEMSTIME, HUD_ItemsTime, itemstime, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // ITEMSTIME
+REGISTER_HUD_PANEL(QUICKMENU, HUD_QuickMenu, quickmenu, PANEL_CONFIG_MAIN , PANEL_SHOW_MAINGAME ) // QUICKMENU
+REGISTER_HUD_PANEL(SCOREBOARD, Scoreboard_Draw, scoreboard, PANEL_CONFIG_NO , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
// always add new panels to the end of list
// Because calling lots of functions in QC apparently cuts fps in half on many machines:
} MACRO_END
// NOTE: in hud_configure mode cvars must be reloaded every frame
-#define HUD_Panel_UpdateCvars() MACRO_BEGIN { \
+float panel_fade_alpha;
+#define HUD_Panel_LoadCvars() MACRO_BEGIN { \
if (panel.update_time <= time) { \
- if (autocvar__hud_configure) panel_enabled = cvar(strcat("hud_panel_", panel.panel_name)); \
panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos"))); \
panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size"))); \
HUD_Panel_ScalePosSize(); \
if (hud_configure_menu_open == 2 && panel == highlightedPanel) { \
HUD_Panel_UpdatePosSize_ForMenu(); \
} else { \
- panel_bg_alpha *= hud_fade_alpha; \
- panel_fg_alpha *= hud_fade_alpha; \
+ panel_bg_alpha *= hud_fade_alpha * panel_fade_alpha; \
+ panel_fg_alpha *= hud_fade_alpha * panel_fade_alpha; \
} \
panel.current_panel_pos = panel_pos; \
panel.current_panel_size = panel_size; \
} else { \
panel_pos = panel.current_panel_pos; \
panel_size = panel.current_panel_size; \
- panel_bg_alpha = panel.current_panel_bg_alpha * hud_fade_alpha; \
+ panel_bg_alpha = panel.current_panel_bg_alpha * hud_fade_alpha * panel_fade_alpha; \
panel_bg_border = panel.current_panel_bg_border; \
panel_bg_color = panel.current_panel_bg_color; \
panel_bg_color_team = panel.current_panel_bg_color_team; \
panel_bg_padding = panel.current_panel_bg_padding; \
- panel_fg_alpha = panel.current_panel_fg_alpha * hud_fade_alpha; \
+ panel_fg_alpha = panel.current_panel_fg_alpha * hud_fade_alpha * panel_fade_alpha; \
} \
} MACRO_END
+#define Hud_Panel_GetPanelEnabled() \
+ panel_enabled = ((panel.panel_configflags & PANEL_CONFIG_CANBEOFF) \
+ ? cvar(strcat("hud_panel_", panel.panel_name)) : true)
+
#define HUD_Panel_UpdatePosSize() MACRO_BEGIN { \
- panel_enabled = cvar(strcat("hud_panel_", panel.panel_name)); \
+ Hud_Panel_GetPanelEnabled(); \
panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos"))); \
panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size"))); \
HUD_Panel_ScalePosSize(); \
return true;
if (highlightedPanel)
- cvar_set(strcat("hud_panel_", highlightedPanel.panel_name), ftos(!cvar(strcat("hud_panel_", highlightedPanel.panel_name))));
+ {
+ if(panel.panel_configflags & PANEL_CONFIG_CANBEOFF)
+ cvar_set(strcat("hud_panel_", highlightedPanel.panel_name), ftos(!cvar(strcat("hud_panel_", highlightedPanel.panel_name))));
+ }
else
cvar_set(strcat("hud_dock"), (autocvar_hud_dock == "") ? "dock" : "");
}
return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
draw_beginBoldFont();
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
}
}
- // this panel fades only when the menu does
- float hud_fade_alpha_save = hud_fade_alpha;
- if(hud_configure_menu_open == 1)
- hud_fade_alpha = 1;
- else
- hud_fade_alpha = 1 - autocvar__menu_alpha;
-
- HUD_Panel_UpdateCvars();
- hud_fade_alpha = hud_fade_alpha_save;
+ HUD_Panel_LoadCvars();
if ( HUD_Radar_Clickable() )
{
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if (!centerprint_showing)
return;
#include "chat.qh"
-/** Handle chat as a panel (#12) */
+
+// Chat (#12)
+
void HUD_Chat()
{
if(!autocvar__hud_configure)
}
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
if(intermission == 2)
{
// chat messages don't scale properly since they are displayed directly by the engine
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
#include "engineinfo.qh"
-// Engine info panel (#13)
+
+// Engine info (#13)
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_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
#include <common/deathtypes/all.qh>
-/** Health/armor (#3) */
+// Health/armor (#3)
+
void HUD_HealthArmor()
{
int armor, health, fuel;
fuel = 20;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
draw_beginBoldFont();
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
#include <common/ent_cs.qh>
#include <common/mapinfo.qh>
-// Info messages panel (#14)
+// Info messages (#14)
float autocvar_hud_panel_infomessages_group0 = 1;
float autocvar_hud_panel_infomessages_group_fadetime = 0.4;
if(!autocvar_hud_panel_infomessages) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
#include "minigame.qh"
-// Minigame
+
+// Minigame (#17, #18, #19, #20)
#include <common/minigames/cl_minigames_hud.qc>
#include <common/ent_cs.qh>
#include <server/mutators/mutator/gamemode_ctf.qh> // TODO: remove
-// Mod icons panel (#10)
+// Mod icons (#10)
bool mod_active; // is there any active mod icon?
if(!HUD_ModIcons_GameType) return;
}
- HUD_Panel_UpdateCvars();
-
- draw_beginBoldFont();
if(mod_active != mod_prev) {
mod_change = time;
else
mod_alpha = bound(0, 1 - (time - mod_change) * 2, 1);
+ //if(mod_alpha <= 0)
+ // return;
+ panel_fade_alpha *= mod_alpha;
+ HUD_Panel_LoadCvars();
+
+ draw_beginBoldFont();
+
if (autocvar_hud_panel_modicons_dynamichud)
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- if(mod_alpha)
- HUD_Panel_DrawBg(mod_alpha);
+
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
#include "notify.qh"
-// Notification area (#4)
+
+
+// Notifications (#4)
void HUD_Notify_Push(string icon, string attacker, string victim)
{
if (!autocvar_hud_panel_notify)
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
+
if (autocvar_hud_panel_notify_dynamichud)
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if (!autocvar__hud_configure)
if (notify_count == 0)
#include <common/mapinfo.qh>
#include <lib/csqcmodel/cl_player.qh>
-// Physics panel (#15)
+// Physics (#15)
vector acc_prevspeed;
float acc_prevtime, acc_avg, top_speed, top_speed_time;
if(autocvar_hud_panel_physics == 3 && !(gametype == MAPINFO_TYPE_RACE || gametype == MAPINFO_TYPE_CTS)) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
draw_beginBoldFont();
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
panel_pos += '1 1 0' * panel_bg_padding;
return;
// Draw panel background
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
+
if (autocvar_hud_panel_powerups_dynamichud)
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
// Set drawing area
vector pos = panel_pos;
#include "pressedkeys.qh"
-/** Draw pressed keys (#11) */
+
+
+// Pressed keys (#11)
+
void HUD_PressedKeys()
{
if(!autocvar__hud_configure)
if(spectatee_status <= 0 && autocvar_hud_panel_pressedkeys < 2) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
#include "quickmenu.qh"
-// QuickMenu (#23)
#include <common/ent_cs.qh>
#include <client/hud/_mod.qh>
#include <client/mapvoting.qh>
+// QuickMenu (#23)
+
// QUICKMENU_MAXLINES must be <= 10
const int QUICKMENU_MAXLINES = 10;
// visible entries are loaded from QuickMenu_Buffer into QuickMenu_Page_* arrays
mousepos.y = bound(0, mousepos.y, vid_conheight);
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
if(panel_bg_padding)
{
}
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
#include <common/mapinfo.qh>
-/** Race timer (#8) */
+// Race timer (#6)
// return the string of the onscreen race timer
string MakeRaceString(int cp, float mytime, float theirtime, float lapdelta, string theirname)
if(spectatee_status == -1) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
pos = panel_pos;
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
mousepos_y = bound(0, mousepos_y, vid_conheight);
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
panel_size = autocvar_hud_panel_radar_maximized_size;
if ( hud_panel_radar_temp_hidden )
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
float f = 0;
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
if(spectatee_status == -1 && (gametype == MAPINFO_TYPE_RACE || gametype == MAPINFO_TYPE_CTS)) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
#include <common/stats.qh>
#include <common/teams.qh>
+// Scoreboard (#24)
+
float sbt_bg_alpha;
float sbt_fg_alpha;
float sbt_fg_alpha_self;
panel_pos = pos;
panel_size.y = 1.25 * hud_fontsize.y * (1 + max(1, tm.team_size));
panel_size.y += panel_bg_padding * 2;
- HUD_Panel_DrawBg(scoreboard_fade_alpha);
+ HUD_Panel_DrawBg();
vector end_pos = panel_pos + eY * (panel_size.y + hud_fontsize.y);
if(panel.current_panel_bg != "0")
panel_pos = pos;
panel_size.y = height * rows;
panel_size.y += panel_bg_padding * 2;
- HUD_Panel_DrawBg(scoreboard_fade_alpha);
+ HUD_Panel_DrawBg();
vector end_pos = panel_pos + eY * (panel_size.y + hud_fontsize.y);
if(panel.current_panel_bg != "0")
panel_pos = pos;
panel_size.y = hud_fontsize.y * rows;
panel_size.y += panel_bg_padding * 2;
- HUD_Panel_DrawBg(scoreboard_fade_alpha);
+ HUD_Panel_DrawBg();
vector end_pos = panel_pos + eY * (panel_size.y + hud_fontsize.y);
if(panel.current_panel_bg != "0")
panel_pos = pos;
panel_size.y = 1.25 * hud_fontsize.y * RANKINGS_RECEIVED_CNT;
panel_size.y += panel_bg_padding * 2;
- HUD_Panel_DrawBg(scoreboard_fade_alpha);
+ HUD_Panel_DrawBg();
vector end_pos = panel_pos + eY * (panel_size.y + hud_fontsize.y);
if(panel.current_panel_bg != "0")
{
if(!autocvar__hud_configure)
{
+ if(!hud_draw_maximized) return;
+
// frametime checks allow to toggle the scoreboard even when the game is paused
if(scoreboard_active) {
if(hud_configure_menu_open == 1)
else
HUD_Scale_Disable();
- float hud_fade_alpha_save = hud_fade_alpha;
- if(hud_configure_menu_open == 1)
- hud_fade_alpha = 1;
- else
- hud_fade_alpha = scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
- HUD_Panel_UpdateCvars();
+ if(scoreboard_fade_alpha <= 0)
+ return;
+ panel_fade_alpha *= scoreboard_fade_alpha;
+ HUD_Panel_LoadCvars();
sbt_bg_alpha = autocvar_hud_panel_scoreboard_table_bg_alpha * panel_fg_alpha;
sbt_highlight = autocvar_hud_panel_scoreboard_table_highlight;
sbt_fg_alpha = autocvar_hud_panel_scoreboard_table_fg_alpha * panel_fg_alpha;
sbt_fg_alpha_self = autocvar_hud_panel_scoreboard_table_fg_alpha_self * panel_fg_alpha;
- hud_fade_alpha = hud_fade_alpha_save;
-
// don't overlap with con_notify
if(!autocvar__hud_configure)
panel_pos.y = max((autocvar_con_notify * autocvar_con_notifysize), panel_pos.y);
#include "timer.qh"
+
+// Timer (#5)
+
void HUD_Timer()
{
if(!autocvar__hud_configure)
if(!autocvar_hud_panel_timer) return;
}
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
draw_beginBoldFont();
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
}
string timer;
- float timelimit, elapsedTime, timeleft, minutesLeft;
+ float timelimit, timeleft, minutesLeft;
timelimit = STAT(TIMELIMIT);
}
vector timer_color;
- if(minutesLeft >= 5 || warmup_stage || timelimit == 0) //don't use red or yellow in warmup or when there is no timelimit
+ if(gameover_time || minutesLeft >= 5 || warmup_stage || timelimit == 0)
timer_color = '1 1 1'; //white
else if(minutesLeft >= 1)
timer_color = '1 1 0'; //yellow
else
timer_color = '1 0 0'; //red
- if (autocvar_hud_panel_timer_increment || (!warmup_stage && timelimit == 0) || (warmup_stage && warmup_timeleft <= 0)) {
- if (time < STAT(GAMESTARTTIME)) {
- //while restart is still active, show 00:00
- timer = seconds_tostring(0);
- } else {
- elapsedTime = floor(time - STAT(GAMESTARTTIME));
- timer = seconds_tostring(elapsedTime);
- }
+ if (gameover_time) {
+ timer = seconds_tostring(max(0, floor(gameover_time - STAT(GAMESTARTTIME))));
+ } else if (autocvar_hud_panel_timer_increment || (!warmup_stage && timelimit == 0) || (warmup_stage && warmup_timeleft <= 0)) {
+ if (time < STAT(GAMESTARTTIME))
+ timer = seconds_tostring(0); //while restart is still active, show 00:00
+ else
+ timer = seconds_tostring(floor(time - STAT(GAMESTARTTIME)));
} else {
if(warmup_stage)
timer = seconds_tostring(warmup_timeleft);
#include <common/mapinfo.qh>
-/** Vote window (#9) */
+// Vote (#9)
+
void HUD_Vote()
{
if(autocvar_cl_allow_uid2name == -1 && (gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE || (serverflags & SERVERFLAG_PLAYERSTATS)))
{
// this dialog gets overriden by the uid2name menu dialog, if it exists
// TODO remove this client side uid2name dialog in the next release
- if(autocvar__menu_alpha)
- hud_fade_alpha = 0;
- else
+ if(!autocvar__menu_alpha)
uid2name_dialog = 0;
+
if (!uid2name_dialog)
localcmd("menu_cmd directmenu Uid2Name\n");
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_vote) return;
-
- panel_fg_alpha = autocvar_hud_panel_fg_alpha;
- panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
-
- if(panel_bg_alpha_str == "") {
- panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
- }
- panel_bg_alpha = stof(panel_bg_alpha_str);
+ /*
+ if(cvar("hud_panel_vote_test")) {
+ if(vote_called_vote) strunzone(vote_called_vote); vote_called_vote = strzone("^1test the vote panel");
+ vote_active = true; vote_yescount = 3; vote_nocount = 2; vote_needed = 4;
+ } else vote_active = false;
+ */
}
else
{
else
vote_alpha = bound(0, 1 - (time - vote_change) * 2, 1);
- if(!vote_alpha)
+ a = vote_alpha * (vote_highlighted ? autocvar_hud_panel_vote_alreadyvoted_alpha : 1);
+ if(a <= 0)
return;
-
- HUD_Panel_UpdateCvars();
+ //panel_fade_alpha *= a;
+ // nothing can hide this panel, not even the menu
+ float hud_fade_alpha_save = hud_fade_alpha;
+ if(uid2name_dialog && autocvar__menu_alpha)
+ hud_fade_alpha = 0;
+ else
+ hud_fade_alpha = a;
+ HUD_Panel_LoadCvars();
+ hud_fade_alpha = hud_fade_alpha_save;
if(uid2name_dialog)
{
pos = panel_pos;
mySize = panel_size;
- a = vote_alpha * (vote_highlighted ? autocvar_hud_panel_vote_alreadyvoted_alpha : 1);
if (autocvar_hud_panel_vote_dynamichud)
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(a);
- a = panel_fg_alpha * a;
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
s = _("A vote has been called for:");
if(uid2name_dialog)
s = _("Allow servers to store and display your name?");
- drawstring_aspect(pos, s, eX * mySize.x + eY * (2/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+ drawstring_aspect(pos, s, eX * mySize.x + eY * (2/8) * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
s = textShortenToWidth(vote_called_vote, mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors);
if(autocvar__hud_configure)
s = _("^1Configure the HUD");
- drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, a, DRAWFLAG_NORMAL);
+ drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
// print the yes/no counts
s = sprintf("^2%s ^7(%d)", getcommandkey_forcename(_("Yes"), "vyes"), vote_yescount);
- drawcolorcodedstring_aspect(pos + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, a, DRAWFLAG_NORMAL);
+ drawcolorcodedstring_aspect(pos + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
s = sprintf("^1%s ^7(%d)", getcommandkey_forcename(_("No"), "vno"), vote_nocount);
- drawcolorcodedstring_aspect(pos + eX * 0.5 * mySize.x + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, a, DRAWFLAG_NORMAL);
+ drawcolorcodedstring_aspect(pos + eX * 0.5 * mySize.x + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
+ pos.y += (5/8) * mySize.y;
+ vector tmp_size = eX * mySize.x + eY * (3/8) * mySize.y;
// draw the progress bar backgrounds
- drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_back", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+ drawpic_skin(pos, "voteprogress_back", tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
// draw the highlights
if(vote_highlighted == 1) {
drawsetcliparea(pos.x, pos.y, mySize.x * 0.5, mySize.y);
- drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_voted", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+ drawpic_skin(pos, "voteprogress_voted", tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
else if(vote_highlighted == -1) {
drawsetcliparea(pos.x + 0.5 * mySize.x, pos.y, mySize.x * 0.5, mySize.y);
- drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_voted", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+ drawpic_skin(pos, "voteprogress_voted", tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
// draw the progress bars
if(vote_yescount && vote_needed)
{
drawsetcliparea(pos.x, pos.y, mySize.x * 0.5 * (vote_yescount/vote_needed), mySize.y);
- drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_prog", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+ drawpic_skin(pos, "voteprogress_prog", tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
if(vote_nocount && vote_needed)
{
drawsetcliparea(pos.x + mySize.x - mySize.x * 0.5 * (vote_nocount/vote_needed), pos.y, mySize.x * 0.5, mySize.y);
- drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_prog", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+ drawpic_skin(pos, "voteprogress_prog", tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
drawresetcliparea();
#include "weapons.qh"
-// Weapon icons (#0)
+
+
+// Weapons (#0)
entity weaponorder[Weapons_MAX];
void weaponorder_swap(int i, int j, entity pass)
}
// update generic hud functions
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
// figure out weapon order (how the weapons are sorted) // TODO make this configurable
if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
if(autocvar__hud_configure)
{
if(hud_configure_menu_open != 2)
- HUD_Panel_DrawBg(1); // also draw the bg of the entire panel
+ HUD_Panel_DrawBg(); // also draw the bg of the entire panel
}
// do we own this weapon?
HUD_Scale_Enable();
else
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(center.x == -1)
return; // panel has gone off screen
alpha = mv_top2_alpha; // Fade away if not one of the top 2 choice
else
alpha = 1; // Normal, full alpha
+ alpha *= panel_fg_alpha;
// Bounding box details
float rect_margin = hud_fontsize.y / 2;
// Highlight selected item
if(id == mv_selection && (mv_flags[id] & GTV_AVAILABLE))
{
- drawfill(rect_pos, rect_size, '1 1 1', 0.1, DRAWFLAG_NORMAL);
+ drawfill(rect_pos, rect_size, '1 1 1', 0.1 * panel_fg_alpha, DRAWFLAG_NORMAL);
}
// Highlight current vote
vector rgb = MapVote_RGB(id);
if(id == mv_ownvote)
{
- drawfill(rect_pos, rect_size, rgb, 0.1*alpha, DRAWFLAG_NORMAL);
+ drawfill(rect_pos, rect_size, rgb, 0.1 * alpha, DRAWFLAG_NORMAL);
drawborderlines(autocvar_hud_panel_mapvote_highlight_border, rect_pos, rect_size, rgb, alpha, DRAWFLAG_NORMAL);
}
theAlpha = mv_top2_alpha;
else
theAlpha = 1;
+ theAlpha *= panel_fg_alpha;
// Highlight selected item
if(id == mv_selection && (mv_flags[id] & GTV_AVAILABLE))
- drawfill(rect_pos, rect_size, '1 1 1', 0.1, DRAWFLAG_NORMAL);
+ drawfill(rect_pos, rect_size, '1 1 1', 0.1 * panel_fg_alpha, DRAWFLAG_NORMAL);
// Highlight current vote
vector rgb = MapVote_RGB(id);
if(id == mv_ownvote)
{
- drawfill(rect_pos, rect_size, rgb, 0.1*theAlpha, DRAWFLAG_NORMAL);
+ drawfill(rect_pos, rect_size, rgb, 0.1 * theAlpha, DRAWFLAG_NORMAL);
drawborderlines(autocvar_hud_panel_mapvote_highlight_border, rect_pos, rect_size, rgb, theAlpha, DRAWFLAG_NORMAL);
}
text_size = stringwidth(label, false, hud_fontsize);
pos.x -= text_size*0.5;
- drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL);
+ drawstring(pos, label, hud_fontsize, rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
}
vector MapVote_GridVec(vector gridspec, int i, int m)
if(!mv_active)
return;
+ HUD_Panel_LoadCvars();
+
if (!autocvar_hud_cursormode)
{
vector mpos = mv_mousepos + getmousepos();
map = ((gametypevote) ? _("Decide the gametype") : _("Vote for a map"));
pos.x = center - stringwidth(map, false, hud_fontsize * 2) * 0.5;
- drawstring(pos, map, hud_fontsize * 2, '1 1 1', 1, DRAWFLAG_NORMAL);
+ drawstring(pos, map, hud_fontsize * 2, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
pos.y += hud_fontsize.y * 2;
if( mapvote_chosenmap != "" )
{
pos.y += hud_fontsize.y * 0.25;
pos.x = center - stringwidth(mapvote_chosenmap, false, hud_fontsize * 1.5) * 0.5;
- drawstring(pos, mapvote_chosenmap, hud_fontsize * 1.5, '1 1 1', 1, DRAWFLAG_NORMAL);
+ drawstring(pos, mapvote_chosenmap, hud_fontsize * 1.5, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
pos.y += hud_fontsize.y * 1.5;
}
pos.y += hud_fontsize.y * 0.5;
i = ceil(max(0, mv_timeout - time));
map = sprintf(_("%d seconds left"), i);
pos.x = center - stringwidth(map, false, hud_fontsize * 1.5) * 0.5;
- drawstring(pos, map, hud_fontsize * 1.5, '0 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(pos, map, hud_fontsize * 1.5, '0 1 0', panel_fg_alpha, DRAWFLAG_NORMAL);
pos.y += hud_fontsize.y * 1.5;
pos.y += hud_fontsize.y * 0.5;
- HUD_Panel_UpdateCvars();
-
// base for multi-column stuff...
pos.y += hud_fontsize.y;
pos.x = xmin;
panel_pos.y = pos.y;
panel_size.x = xmax - xmin;
panel_size.y = ymax - ymin;
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
MapVote_DrawAbstain(pos, dist.x, xmax - xmin, tmp, i);
}
- draw_cursor_normal(mv_mousepos, '1 1 1', 1 - autocvar__menu_alpha);
+ draw_cursor_normal(mv_mousepos, '1 1 1', panel_fg_alpha);
}
void Cmd_MapVote_MapDownload(int argc)
if(!postinit)
PostInit();
+ if(intermission && !gameover_time)
+ gameover_time = time;
+
if(intermission && !isdemo() && !(calledhooks & HOOK_END))
{
if(calledhooks & HOOK_START)
if ( !hud_minigame )
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
if ( !hud_minigame )
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
{
panel = HUD_PANEL(MINIGAME_MENU);
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
if(panel_bg_padding)
{
if ( !HUD_MinigameMenu_IsOpened() )
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
HUD_Scale_Disable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
if(panel_bg_padding)
{
if ( !help_message )
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
// Required function, draw the game status panel
void bd_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
// Required function, draw the game status panel
void c4_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
// Required function, draw the game status panel
void nmm_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
-
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
pos_y += ts_y;
// Required function, draw the game status panel
void pong_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
// Required function, draw the game status panel
void pp_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
// Required function, draw the game status panel
void ps_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
// Required function, draw the game status panel
void snake_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
// Required function, draw the game status panel
void ttt_hud_status(vector pos, vector mySize)
{
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
vector ts;
ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
if (count == 0)
return;
- HUD_Panel_UpdateCvars();
+ HUD_Panel_LoadCvars();
vector pos, mySize;
pos = panel_pos;
{
if (autocvar__hud_configure)
if (hud_configure_menu_open != 2)
- HUD_Panel_DrawBg(1); // also draw the bg of the entire panel
+ HUD_Panel_DrawBg(); // also draw the bg of the entire panel
// reduce panel to avoid spacing items
if (itemstime_size.x / itemstime_size.y < ar)
}
HUD_Scale_Enable();
- HUD_Panel_DrawBg(1);
+ HUD_Panel_DrawBg();
float row = 0, column = 0;
bool item_available;