From: z411 Date: Sun, 20 Mar 2022 00:15:00 +0000 (-0300) Subject: Flipped centerprint title fix X-Git-Tag: xonotic-v0.8.5~128^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=78f029e455509478f3756ef6c9c0936222b54bbd;p=xonotic%2Fxonotic-data.pk3dir.git Flipped centerprint title fix --- diff --git a/hud_luma.cfg b/hud_luma.cfg index 34aa9f756..68cc7625a 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -275,7 +275,7 @@ seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.4" -seta hud_panel_centerprint_fontscale_title "1.6" +seta hud_panel_centerprint_fontscale_title "1.8" seta hud_panel_minigameboard_pos "0.22 0.15" seta hud_panel_minigameboard_size "0.50 0.60" diff --git a/hud_luminos.cfg b/hud_luminos.cfg index a89233680..b0e0e409c 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -275,7 +275,7 @@ seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.4" -seta hud_panel_centerprint_fontscale_title "1.6" +seta hud_panel_centerprint_fontscale_title "1.8" seta hud_panel_minigameboard_pos "0.22 0.15" seta hud_panel_minigameboard_size "0.50 0.60" diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index 23319fe25..1f2280bc8 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -275,7 +275,7 @@ seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.4" -seta hud_panel_centerprint_fontscale_title "1.6" +seta hud_panel_centerprint_fontscale_title "1.8" seta hud_panel_minigameboard_pos "0.22 0.15" seta hud_panel_minigameboard_size "0.50 0.60" diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index 05faec673..76377a22d 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -275,7 +275,7 @@ seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.4" -seta hud_panel_centerprint_fontscale_title "1.6" +seta hud_panel_centerprint_fontscale_title "1.8" seta hud_panel_minigameboard_pos "0.22 0.15" seta hud_panel_minigameboard_size "0.50 0.60" diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index 633c87b88..121f196dd 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -275,7 +275,7 @@ seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.4" -seta hud_panel_centerprint_fontscale_title "1.6" +seta hud_panel_centerprint_fontscale_title "1.8" seta hud_panel_minigameboard_pos "0.22 0.15" seta hud_panel_minigameboard_size "0.50 0.60" diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index 733ff2d80..919ba39a2 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -275,7 +275,7 @@ seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.4" -seta hud_panel_centerprint_fontscale_title "1.6" +seta hud_panel_centerprint_fontscale_title "1.8" seta hud_panel_minigameboard_pos "0.22 0.15" seta hud_panel_minigameboard_size "0.50 0.60" diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index 6d509257d..ec11e1bac 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -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)); diff --git a/qcsrc/client/hud/panel/centerprint.qh b/qcsrc/client/hud/panel/centerprint.qh index 01ebd6255..3cb3d1c9c 100644 --- a/qcsrc/client/hud/panel/centerprint.qh +++ b/qcsrc/client/hud/panel/centerprint.qh @@ -14,7 +14,7 @@ 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;