{
if(highlightedPanel == HUD_PANEL(CENTERPRINT))
{
- centerprint_SetTitle(strcat("test", ftos(hud_configure_cp_generation_time)));
+ centerprint_SetTitle(strcat("Title at ", ftos(floor(hud_configure_cp_generation_time))));
float r;
r = random();
centerprint_Add(0, sprintf(_("^1Multiline message at time %s that\n^BOLDlasts longer than normal"), seconds_tostring(time)), 20, 0);
else
centerprint_AddStandard(sprintf(_("Message at time %s"), seconds_tostring(time)));
- //hud_configure_cp_generation_time = time + 1 + random()*4;
- hud_configure_cp_generation_time = time + 1;
+ hud_configure_cp_generation_time = time + 1 + random()*4;
}
else
{
// Show title if available
if(centerprint_title_show) {
- vector fontsize = hud_fontsize * 1.5 * autocvar_hud_panel_centerprint_fontscale_title;
+ vector fontsize = hud_fontsize * autocvar_hud_panel_centerprint_fontscale_title;
float width = stringwidth(centerprint_title, true, fontsize);
pos.x = panel_pos.x + (panel_size.x - width) * align;
if (autocvar_hud_panel_centerprint_flip)
pos.y -= hud_fontsize.y * CENTERPRINT_TITLE_SPACING / 2;
else
- pos.y += fontsize.y + (hud_fontsize.y * CENTERPRINT_TITLE_SPACING / 2);
+ pos.y += fontsize.y + (hud_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2));
drawfill(pos, vec2(width, 1), '1 1 1', 1, DRAWFLAG_NORMAL);
if (autocvar_hud_panel_centerprint_flip)
- pos.y -= hud_fontsize.y * 1.5 * (CENTERPRINT_TITLE_SPACING / 2);
+ pos.y -= hud_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2);
else
- pos.y += hud_fontsize.y * 1.5 * (CENTERPRINT_TITLE_SPACING / 2);
+ pos.y += hud_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2);
all_messages_expired = false;
}
if (a <= 0.5/255.0 && centerprint_countdown_num[j] == 0) // Guaranteed invisible - don't show.
continue;
- // set the size from fading in/out before subsequent fading
- sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize);
-
// also fade it based on positioning
if(autocvar_hud_panel_centerprint_fade_subsequent)
{
}
a *= panel_fg_alpha;
- // finally set the size based on the new alpha from subsequent fading
- // TODO: Apply this only if subsequent, otherwise it fucks it up
- if(g)
- sz = sz * (autocvar_hud_panel_centerprint_fade_subsequent_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_subsequent_minfontsize));
+ // finally set the size based on the alpha
+ sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize);
drawfontscale = hud_scale * sz;
if (centerprint_countdown_num[j])
while(getWrappedLine_remaining)
{
bool is_bold = (substring(getWrappedLine_remaining, 0, 5) == BOLD_OPERATOR);
- vector fontsize = hud_fontsize * 1.5 * (is_bold ? autocvar_hud_panel_centerprint_fontscale_bold : autocvar_hud_panel_centerprint_fontscale);
+ vector fontsize = hud_fontsize * (is_bold ? autocvar_hud_panel_centerprint_fontscale_bold : autocvar_hud_panel_centerprint_fontscale);
ts = getWrappedLine(panel_size.x * hud_scale.x * sz, fontsize, stringwidth_colors);
if (ts != "")
getWrappedLine_remaining = argv(k);
bool is_bold = (substring(getWrappedLine_remaining, 0, 5) == BOLD_OPERATOR);
- vector fontsize = hud_fontsize * 1.5 * (is_bold ? autocvar_hud_panel_centerprint_fontscale_bold : autocvar_hud_panel_centerprint_fontscale);
+ vector fontsize = hud_fontsize * (is_bold ? autocvar_hud_panel_centerprint_fontscale_bold : autocvar_hud_panel_centerprint_fontscale);
if (is_bold)
getWrappedLine_remaining = substring(getWrappedLine_remaining, 5, -1);
float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha = 0.5;
float autocvar_hud_panel_centerprint_fade_subsequent_passtwo = 10;
float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha = 0.5;
-float autocvar_hud_panel_centerprint_fade_subsequent_minfontsize = 0.75;
float autocvar_hud_panel_centerprint_fade_minfontsize = 1;
bool autocvar_hud_panel_centerprint_flip;
float autocvar_hud_panel_centerprint_fontscale = 1;
float autocvar_hud_panel_centerprint_fontscale_bold = 1.4;
-float autocvar_hud_panel_centerprint_fontscale_title = 1.6;
+float autocvar_hud_panel_centerprint_fontscale_title = 1.8;
bool autocvar_hud_panel_centerprint_dynamichud = true;
float autocvar_hud_panel_centerprint_time;