From 6fdea9c1ba7d573555611633e655e34ab95ccc7e Mon Sep 17 00:00:00 2001 From: James R Date: Fri, 29 Dec 2023 13:22:36 -0800 Subject: [PATCH] Menus/Time Attack: add cursor hand --- src/k_menudraw.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 3b70befef..84bfe86c5 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -173,6 +173,11 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop) V_DrawScaledPatch(x - 4 + (((SLIDER_RANGE)*8 + 4)*range)/100, y, 0, p); } +static void M_DrawCursorHand(INT32 x, INT32 y) +{ + V_DrawScaledPatch(x - 24, y, 0, W_CachePatchName("M_CURSOR", PU_CACHE)); +} + static patch_t *addonsp[NUM_EXT+5]; static patch_t *bgMapImage; @@ -3487,9 +3492,19 @@ void M_DrawTimeAttack(void) case IT_STRING: if (i >= currentMenu->numitems-1) + { V_DrawRightAlignedMenuString(rightedge, opty, f, currentMenu->menuitems[i].text); + + if (i == itemOn) + M_DrawCursorHand(rightedge - V_MenuStringWidth(currentMenu->menuitems[i].text, 0), opty); + } else + { V_DrawMenuString(leftedge, opty, f, currentMenu->menuitems[i].text); + + if (i == itemOn) + M_DrawCursorHand(leftedge, opty); + } opty += 10; // Cvar specific handling