From 68a73a4bf0775a91803de9460ca1c64dae6c47b8 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 27 Dec 2023 11:42:47 -0800 Subject: [PATCH] Menus/Character Select: highlight selected Profile Color is subject to change. I used Sapphire, but it doesn't have any green in it. However, I used it because it produces good saturation. --- src/k_menudraw.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 32b56d9eb..6c145d17f 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -1986,7 +1986,28 @@ static void M_DrawCharSelectPreview(UINT8 num) if (i != p->profilen || ((setup_animcounter/10) & 1)) { - V_DrawCenteredFileString(px+26, py, notSelectable, pr->version ? pr->profilename : "NEW"); + const char *txt = pr->version ? pr->profilename : "NEW"; + + fixed_t w = V_StringScaledWidth( + FRACUNIT, + FRACUNIT, + FRACUNIT, + notSelectable, + FILE_FONT, + txt + ); + + V_DrawStringScaled( + ((px+26) * FRACUNIT) - (w/2), + py * FRACUNIT, + FRACUNIT, + FRACUNIT, + FRACUNIT, + notSelectable, + i == p->profilen ? R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SAPPHIRE, GTC_CACHE) : NULL, + FILE_FONT, + txt + ); } } py += 12;