From d6c86b97b6dbd0b3561f086c31068c9de3859f21 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 3 May 2023 18:05:51 +0100 Subject: [PATCH] K_drawKartFreePlay: Fix alignment for good Uses V_StringScaledWidth instead of manually inserted spacing --- src/k_hud.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/k_hud.c b/src/k_hud.c index 62c4112af..3752de229 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -4919,8 +4919,18 @@ void K_drawKartFreePlay(void) if (((leveltime-lt_endtime) % TICRATE) < TICRATE/2) return; + const fixed_t x = ((BASEVIDWIDTH - (LAPS_X+6)) * FRACUNIT) - \ + V_StringScaledWidth( + FRACUNIT, + FRACUNIT, + FRACUNIT, + V_HUDTRANS|V_SLIDEIN|V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_SPLITSCREEN, + KART_FONT, + "FREE PLAY" + ); + V_DrawStringScaled( - ((BASEVIDWIDTH - (LAPS_X+1)) - 72) * FRACUNIT, // mirror the laps thingy + x, (LAPS_Y+3) * FRACUNIT, FRACUNIT, FRACUNIT,