seta hud_panel_centerprint_bg_alpha ""
seta hud_panel_centerprint_bg_border ""
seta hud_panel_centerprint_bg_padding ""
+seta hud_panel_centerprint_align "0.5"
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_time "2"
float autocvar_hud_panel_healtharmor_progressbar_gfx_smooth;
float autocvar_hud_panel_centerprint;
+float autocvar_hud_panel_centerprint_align;
float autocvar_hud_panel_centerprint_fontscale;
float autocvar_hud_panel_centerprint_time;
float autocvar_hud_panel_healtharmor_text;
entries = bound(1, floor(panel_size_y/height), CENTERPRINT_MAX_ENTRIES);
float i, j, k, n;
+ float a, sz, fade, align;
vector pos;
string ts;
- float a, sz, fade;
pos = panel_pos;
fade = min(autocvar_hud_panel_centerprint_time/8, 0.25);
+ align = bound(0, autocvar_hud_panel_centerprint_align, 1);
for (i=0, j=cpm_index; i<CENTERPRINT_MAX_MSGS; ++i, ++j)
{
if (j == CENTERPRINT_MAX_MSGS)
while(getWrappedLine_remaining)
{
ts = getWrappedLine(panel_size_x, fontsize, stringwidth_colors);
- pos_x = panel_pos_x + (panel_size_x - stringwidth(ts, TRUE, fontsize)) * 0.5;
if (ts != "")
{
+ if (align)
+ pos_x = panel_pos_x + (panel_size_x - stringwidth(ts, TRUE, fontsize)) * align;
drawcolorcodedstring(pos + '0 1 0' * 1.5 * (1 - sz) * fontsize_y, ts, fontsize, a, DRAWFLAG_NORMAL);
pos_y += fontsize_y * 1.5;
}
HUD_Write_PanelCvar_q("_acceleration_mode");
break;
case HUD_PANEL_CENTERPRINT:
+ HUD_Write_PanelCvar_q("_align");
HUD_Write_PanelCvar_q("_fontscale");
HUD_Write_PanelCvar_q("_time");
break;