else
{
if(!hud_configure_prev)
+ {
reset_centerprint_messages();
+ hud_configure_cp_generation_time = time; // show a message immediately
+ }
if (time > hud_configure_cp_generation_time)
{
if(highlightedPanel == HUD_PANEL(CENTERPRINT))
}
}
+ if (autocvar_hud_panel_centerprint_dynamichud)
+ HUD_Scale_Enable();
+ else
+ HUD_Scale_Disable();
HUD_Panel_DrawBg(1);
if (!centerprint_showing)
// also fade it based on positioning
if(autocvar_hud_panel_centerprint_fade_subsequent)
{
- a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passone))), 1); // pass one: all messages after the first have half theAlpha
- a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passtwo))), 1); // pass two: after that, gradually lower theAlpha even more for each message
+ // pass one: all messages after the first have half alpha
+ a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passone))), 1);
+ // pass two: after that, gradually lower alpha even more for each message
+ a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passtwo))), 1);
}
a *= panel_fg_alpha;
- // finally set the size based on the new theAlpha from subsequent fading
+ // finally set the size based on the new alpha from subsequent fading
sz = sz * (autocvar_hud_panel_centerprint_fade_subsequent_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_subsequent_minfontsize));
- drawfontscale = sz * '1 1 0';
+ drawfontscale = hud_scale * sz;
if (centerprint_countdown_num[j])
n = tokenizebyseparator(strreplace("^COUNT", count_seconds(centerprint_countdown_num[j]), centerprint_messages[j]), "\n");
getWrappedLine_remaining = argv(k);
while(getWrappedLine_remaining)
{
- ts = getWrappedLine(panel_size.x * sz, fontsize, stringwidth_colors);
+ ts = getWrappedLine(panel_size.x * hud_scale.x * sz, fontsize, stringwidth_colors);
if (ts != "")
pos.y -= fontsize.y;
else
getWrappedLine_remaining = argv(k);
while(getWrappedLine_remaining)
{
- ts = getWrappedLine(panel_size.x * sz, fontsize, stringwidth_colors);
+ ts = getWrappedLine(panel_size.x * hud_scale.x * sz, fontsize, stringwidth_colors);
if (ts != "")
{
if (align)
- pos.x = panel_pos.x + (panel_size.x - stringwidth(ts, true, fontsize)) * align;
+ pos.x = panel_pos.x + (panel_size.x - stringwidth(ts, true, fontsize) * sz) * align;
if (a > 0.5/255.0) // Otherwise guaranteed invisible - don't show. This is checked a second time after some multiplications with other factors were done so temporary changes of these cannot cause flicker.
- drawcolorcodedstring(pos + eY * 0.5 * (1 - sz) * fontsize.y, ts, fontsize, a, DRAWFLAG_NORMAL);
+ drawcolorcodedstring(pos + eY * 0.5 * (1 - sz * hud_scale.x) * fontsize.y, ts, fontsize, a, DRAWFLAG_NORMAL);
pos.y += fontsize.y;
}
else
if (pos.y < panel_pos.y) // check if the next message can be shown
{
- drawfontscale = '1 1 0';
+ drawfontscale = hud_scale;
return;
}
}
if(pos.y > panel_pos.y + panel_size.y - fontsize.y) // check if the next message can be shown
{
- drawfontscale = '1 1 0';
+ drawfontscale = hud_scale;
return;
}
}
}
- drawfontscale = '1 1 0';
+ drawfontscale = hud_scale;
if (all_messages_expired)
{
centerprint_showing = false;