From 6d0409e33d6cefe0c7fd5f40aa7f391d30cc398d Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 25 Feb 2023 14:16:43 +0000 Subject: [PATCH] M_DrawChallenges: Adjust drawing order so all underlays are drawn before any actual content Prevents reticule on bottom row getting slightly cut off --- src/k_menudraw.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 0ee9ad64d..b71179ede 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -5003,7 +5003,7 @@ static void M_DrawChallengePreview(INT32 x, INT32 y) void M_DrawChallenges(void) { INT32 x = currentMenu->x, explodex, selectx; - INT32 y = currentMenu->y; + INT32 y; INT16 i, j; const char *str; INT16 offset; @@ -5030,12 +5030,25 @@ void M_DrawChallenges(void) #undef questionloop } + // Do underlay for everything else early so the bottom of the reticule doesn't get shaded over. + { + y = 120; + + V_DrawScaledPatch(0, y, + (10-challengetransparentstrength)<challengegrid == NULL || challengesmenu.extradata == NULL) { V_DrawCenteredString(x, y, V_REDMAP, "No challenges available!?"); goto challengedesc; } + y = currentMenu->y; + V_DrawFadeFill(0, y-2, BASEVIDWIDTH, 90, 0, 31, challengetransparentstrength); x -= (challengesgridstep-1); @@ -5122,12 +5135,6 @@ challengedesc: { y = 120; - V_DrawScaledPatch(0, y, - (10-challengetransparentstrength)<