}
if (time > hud_configure_cp_generation_time)
{
- if(highlightedPanel == HUD_PANEL(CENTERPRINT))
+ if (highlightedPanel == panel)
{
centerprint_SetTitle(sprintf(_("Title at %s"), seconds_tostring(hud_configure_cp_generation_time)));
if(autocvar__hud_configure)
{
+ float alpha = 1; // engine can display chat only at full alpha
+ if (hud_configure_menu_open == 2 && highlightedPanel != panel)
+ alpha = hud_fade_alpha; // fade only when the settings menu of another panel is open
vector chatsize = '1 1 0' * autocvar_con_chatsize;
if (cvar_string("con_chatrect_x") != "9001")
cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
string str = textShortenToWidth(_("^3Player^7: This is the chat area."), mySize.x, chatsize, stringwidth_colors);
for(int i = 0; i < autocvar_con_chat; ++i)
{
- // engine displays chat text at full alpha
- drawcolorcodedstring(pos, str, chatsize, 1, DRAWFLAG_NORMAL);
+ drawcolorcodedstring(pos, str, chatsize, alpha, DRAWFLAG_NORMAL);
pos.y += chatsize.y;
}
}
float color_ratio, alpha1, alpha2;
vector segment_size = size;
alpha1 = bound(0, alpha, 1);
- alpha2 = bound(0, autocvar_hud_panel_strafehud_bar_neutral_alpha, 1);
+ alpha2 = bound(0, autocvar_hud_panel_strafehud_bar_neutral_alpha * panel_fg_alpha, 1);
if((alpha1 + alpha2) == 0) return;
color_ratio = alpha1 / (alpha1 + alpha2);
for(int i = 0; i < size.x; ++i)
a = vote_alpha * (vote_highlighted ? autocvar_hud_panel_vote_alreadyvoted_alpha : 1);
if(a <= 0)
return;
- //panel_fade_alpha *= a;
- // nothing can hide this panel, not even the menu
+
+ // menu can't hide this panel, unless:
+ // 1) the uid2name menu dialog is open (replaces this panel)
+ // 2) the settings menu of another panel is open (hud_config mode)
float hud_fade_alpha_save = hud_fade_alpha;
if(uid2name_dialog && autocvar__menu_alpha)
hud_fade_alpha = 0;
- else
+ else if(!(hud_configure_menu_open == 2 && highlightedPanel != panel))
hud_fade_alpha = a;
HUD_Panel_LoadCvars();
hud_fade_alpha = hud_fade_alpha_save;