// update generic hud functions
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
float f = 0;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
return;
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
if(uid2name_dialog)
{
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
if(autocvar__con_chat_maximized && !autocvar__hud_configure) // draw at full screen height if maximized
{
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
}
HUD_Panel_UpdateCvars();
- HUD_Panel_ApplyFadeAlpha();
draw_beginBoldFont();
}
}
+ // this panel fades only when the menu does
+ float hud_fade_alpha_save = 0;
+ if(scoreboard_fade_alpha)
+ {
+ hud_fade_alpha_save = hud_fade_alpha;
+ hud_fade_alpha = 1 - autocvar__menu_alpha;
+ }
HUD_Panel_UpdateCvars();
- // this panel doesn't fade when showing the scoreboard
- if(autocvar__menu_alpha)
- HUD_Panel_ApplyFadeAlpha();
-
if(scoreboard_fade_alpha)
{
+ hud_fade_alpha = hud_fade_alpha_save;
+
// move the panel below the scoreboard
if (scoreboard_bottom >= 0.96 * vid_conheight)
return;
hud_fade_alpha = 0;
// panels that we want to be active together with the scoreboard
- // they must call HUD_Panel_ApplyFadeAlpha(); only when showing the menu
+ // they must fade only when the menu does
if(scoreboard_fade_alpha == 1)
{
(panel = HUD_PANEL(CENTERPRINT)).panel_draw();
panel_bg_color_team = stof(panel_bg_color_team_str);\
}
-// the check doesn't allow to fade this panel when showing the panel-specific menu dialog
-#define HUD_Panel_ApplyFadeAlpha()\
-if(!(menu_enabled == 2 && panel == highlightedPanel))\
-{\
- panel_bg_alpha *= hud_fade_alpha;\
- panel_fg_alpha *= hud_fade_alpha;\
-} ENDS_WITH_CURLY_BRACE
-
// Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
// comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
#define HUD_Panel_GetBgAlpha()\
}\
HUD_Panel_GetFgAlpha()\
HUD_Panel_GetPadding()\
+ panel.current_panel_bg_alpha = panel_bg_alpha; \
+ panel.current_panel_fg_alpha = panel_fg_alpha; \
if(menu_enabled == 2 && panel == highlightedPanel) {\
HUD_Panel_UpdatePosSize_ForMenu()\
- } \
+ } else {\
+ panel_bg_alpha *= hud_fade_alpha;\
+ panel_fg_alpha *= hud_fade_alpha;\
+ }\
panel.current_panel_pos = panel_pos; \
panel.current_panel_size = panel_size; \
if(panel.current_panel_bg != "") \
strunzone(panel.current_panel_bg); \
panel.current_panel_bg = strzone(panel_bg); \
- panel.current_panel_bg_alpha = panel_bg_alpha; \
panel.current_panel_bg_border = panel_bg_border; \
panel.current_panel_bg_color = panel_bg_color; \
panel.current_panel_bg_color_team = panel_bg_color_team; \
panel.current_panel_bg_padding = panel_bg_padding; \
- panel.current_panel_fg_alpha = panel_fg_alpha; \
panel.update_time = (autocvar__hud_configure) ? time : time + autocvar_hud_panel_update_interval; \
} else { \
panel_pos = panel.current_panel_pos; \
panel_size = panel.current_panel_size; \
panel_bg = panel.current_panel_bg; \
- panel_bg_alpha = panel.current_panel_bg_alpha; \
+ panel_bg_alpha = panel.current_panel_bg_alpha * hud_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; \
+ panel_fg_alpha = panel.current_panel_fg_alpha * hud_fade_alpha; \
} ENDS_WITH_CURLY_BRACE
#define HUD_Panel_UpdatePosSize() {\