mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Menus/Controls: draw tooltip at bottom of the screen
This commit is contained in:
parent
ea2fffb79d
commit
535bda8b88
1 changed files with 24 additions and 8 deletions
|
|
@ -4795,6 +4795,8 @@ void M_DrawProfileControls(void)
|
||||||
INT32 x = 8;
|
INT32 x = 8;
|
||||||
INT32 i, j, k;
|
INT32 i, j, k;
|
||||||
const UINT8 pid = 0;
|
const UINT8 pid = 0;
|
||||||
|
patch_t *hint = W_CachePatchName("MENUHINT", PU_CACHE);
|
||||||
|
INT32 hintofs = 3;
|
||||||
|
|
||||||
V_DrawScaledPatch(BASEVIDWIDTH*2/3 - optionsmenu.contx, BASEVIDHEIGHT/2 -optionsmenu.conty, 0, W_CachePatchName("PR_CONT", PU_CACHE));
|
V_DrawScaledPatch(BASEVIDWIDTH*2/3 - optionsmenu.contx, BASEVIDHEIGHT/2 -optionsmenu.conty, 0, W_CachePatchName("PR_CONT", PU_CACHE));
|
||||||
|
|
||||||
|
|
@ -4826,16 +4828,16 @@ void M_DrawProfileControls(void)
|
||||||
return; // Don't draw the rest if we're trying the controller.
|
return; // Don't draw the rest if we're trying the controller.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tooltip
|
|
||||||
// The text is slightly shifted hence why we don't just use M_DrawMenuTooltips()
|
|
||||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, W_CachePatchName("MENUHINT", PU_CACHE), NULL);
|
|
||||||
if (currentMenu->menuitems[itemOn].tooltip != NULL)
|
|
||||||
{
|
|
||||||
V_DrawCenteredThinString(229, 12, 0, currentMenu->menuitems[itemOn].tooltip);
|
|
||||||
}
|
|
||||||
|
|
||||||
V_DrawFill(0, 0, 138, 200, 31); // Black border
|
V_DrawFill(0, 0, 138, 200, 31); // Black border
|
||||||
|
|
||||||
|
V_SetClipRect(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
BASEVIDWIDTH * FRACUNIT,
|
||||||
|
(BASEVIDHEIGHT - SHORT(hint->height) + hintofs) * FRACUNIT,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
// Draw the menu options...
|
// Draw the menu options...
|
||||||
for (i = 0; i < currentMenu->numitems; i++)
|
for (i = 0; i < currentMenu->numitems; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -5015,6 +5017,20 @@ void M_DrawProfileControls(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
V_ClearClipRect();
|
||||||
|
|
||||||
|
// Tooltip
|
||||||
|
// Draw it at the bottom of the screen
|
||||||
|
{
|
||||||
|
static UINT8 blue[256];
|
||||||
|
blue[31] = 253;
|
||||||
|
V_DrawMappedPatch(0, BASEVIDHEIGHT + hintofs, V_VFLIP, hint, blue);
|
||||||
|
}
|
||||||
|
if (currentMenu->menuitems[itemOn].tooltip != NULL)
|
||||||
|
{
|
||||||
|
V_DrawCenteredThinString(BASEVIDWIDTH/2, BASEVIDHEIGHT + hintofs - 9 - 12, 0, currentMenu->menuitems[itemOn].tooltip);
|
||||||
|
}
|
||||||
|
|
||||||
// Overlay for control binding
|
// Overlay for control binding
|
||||||
if (optionsmenu.bindcontrol)
|
if (optionsmenu.bindcontrol)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue