M_DrawChallenges: reimplement dark areas for contrast/readability

Now uses V_DrawFadeFill and MENUHINT patch directly.
This commit is contained in:
toaster 2023-02-23 17:24:11 +00:00
parent d66a4cff81
commit d17525fac7

View file

@ -4819,6 +4819,8 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
}
}
#define challengetransparentstrength 8
void M_DrawChallenges(void)
{
INT32 x = currentMenu->x, explodex, selectx;
@ -4855,6 +4857,8 @@ void M_DrawChallenges(void)
goto challengedesc;
}
V_DrawFadeFill(0, y-2, BASEVIDWIDTH, 90, 0, 31, challengetransparentstrength);
x -= 16;
x += challengesmenu.offset;
@ -4939,6 +4943,12 @@ challengedesc:
{
y = 120;
V_DrawScaledPatch(0, y,
(10-challengetransparentstrength)<<V_ALPHASHIFT,
W_CachePatchName("MENUHINT", PU_CACHE));
V_DrawFadeFill(0, y+27, BASEVIDWIDTH, BASEVIDHEIGHT - (y+27), 0, 31, challengetransparentstrength);
if (challengesmenu.currentunlock < MAXUNLOCKABLES)
{
str = unlockables[challengesmenu.currentunlock].name;
@ -4978,6 +4988,8 @@ challengedesc:
}
}
#undef challengetransparentstrength
// Statistics menu
#define STATSSTEP 10