]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/centerprint.qc
Flipped centerprint title fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / centerprint.qc
index 13ab741d723464bdc8d85a4514328b2ca2e51cde..ec11e1bac1048ecdde99a076abf5db4b954aec01 100644 (file)
@@ -188,7 +188,7 @@ void HUD_CenterPrint()
                {
                        if(highlightedPanel == HUD_PANEL(CENTERPRINT))
                        {
-                               centerprint_SetTitle(strcat("Title at ", ftos(floor(hud_configure_cp_generation_time))));
+                               centerprint_SetTitle(sprintf(_("Title at %s"), seconds_tostring(hud_configure_cp_generation_time)));
 
                                float r;
                                r = random();
@@ -265,11 +265,14 @@ void HUD_CenterPrint()
                vector fontsize = cp_fontsize * autocvar_hud_panel_centerprint_fontscale_title;
                float width = stringwidth(centerprint_title, true, fontsize);
 
+               if (autocvar_hud_panel_centerprint_flip)
+                       pos.y -= cp_fontsize.y;
+
                pos.x = panel_pos.x + (panel_size.x - width) * align;
                drawcolorcodedstring(pos, centerprint_title, fontsize, 1, DRAWFLAG_NORMAL);
 
                if (autocvar_hud_panel_centerprint_flip)
-                       pos.y -= hud_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2);
+                       pos.y -= cp_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2);
                else
                        pos.y += fontsize.y + (hud_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2));
 
@@ -315,7 +318,7 @@ void HUD_CenterPrint()
                float fade_out_time = autocvar_hud_panel_centerprint_fade_out;
 
                if (centerprint_countdown_num[j]) {
-                       fade_in_time = autocvar_hud_panel_centerprint_fade_in_short;
+                       fade_in_time = 0;
                        fade_out_time = 0;
                }