Merge branch 'rqdx-menu-fix' into 'master'

Roundqueue DX Menu UI fixes

Closes #1570, #1572, and #1647

See merge request kart-krew-dev/ring-racers-internal!2786
This commit is contained in:
Oni VelocitOni 2025-09-01 01:32:55 +00:00
commit 9675aaf40f
4 changed files with 59 additions and 13 deletions

View file

@ -983,6 +983,16 @@ void M_Drawer(void)
if (currentMenu->drawroutine)
currentMenu->drawroutine(); // call current menu Draw routine
if (
(
currentMenu == &PLAY_LevelSelectDef
|| currentMenu == &PLAY_CupSelectDef
) && levellist.canqueue
)
{
M_DrawPauseRoundQueue(0, true);
}
M_DrawMenuForeground();
// Draw version down in corner
@ -998,16 +1008,6 @@ void M_Drawer(void)
// Draw message overlay when needed
M_DrawMenuMessage();
if (
(
currentMenu == &PLAY_LevelSelectDef
|| currentMenu == &PLAY_CupSelectDef
) && levellist.canqueue
)
{
M_DrawPauseRoundQueue(0, true);
}
}
if (menuwipe)
@ -3738,6 +3738,43 @@ void M_DrawLevelSelect(void)
}
M_DrawCupTitle(tay, &levellist.levelsearch);
t = (abs(t)/2) + BASEVIDWIDTH - 4;
tay += 30;
const boolean queuewithinsize = (menuqueue.size + roundqueue.size < ROUNDQUEUE_MAX);
const char *worktext = "Go to Course";
if (levellist.levelsearch.timeattack)
worktext = "Select Course";
else if (levellist.canqueue && menuqueue.size && queuewithinsize)
worktext = roundqueue.size ? "Add to Queue" : "Start Queue";
if (worktext)
{
K_DrawGameControl(t, tay, 0, va("<a_animated> %s", worktext), 2, TINY_FONT, 0);
tay += 13;
}
if (levellist.canqueue)
{
worktext = queuewithinsize
? "<z_animated>" : "<z_pressed><gray>";
K_DrawGameControl(t, tay, 0, va("%s Queue Course", worktext), 2, TINY_FONT, 0);
tay += 13;
worktext = NULL;
if (menuqueue.size)
worktext = "Undo";
else if (roundqueue.size)
worktext = "Clear Queue";
if (worktext)
{
K_DrawGameControl(t, tay, 0, va("<c_animated> %s", worktext), 2, TINY_FONT, 0);
tay += 13;
}
}
}
static boolean M_LevelSelectHasBG(menu_t *check)

View file

@ -69,7 +69,7 @@ menuitem_t EXTRAS_Main[] =
NULL, {.routine = M_Manual}, 0, 0},
{IT_STRING | IT_CALL, "Tutorial", "Help Dr. Robotnik and Tails test out their new Ring Racers.",
NULL, {.routine = M_LevelSelectInit}, 0, GT_TUTORIAL},
NULL, {.routine = M_LevelSelectInit}, 3, GT_TUTORIAL},
{IT_STRING | IT_CALL, "Statistics", "Look back on some of your greatest achievements such as your playtime and wins!",
NULL, {.routine = M_Statistics}, 0, 0},

View file

@ -675,6 +675,11 @@ void M_LevelSelectInit(INT32 choice)
levellist.levelsearch.timeattack = false;
levellist.canqueue = false;
break;
case 3:
levellist.levelsearch.grandprix = false;
levellist.levelsearch.timeattack = false;
levellist.canqueue = false;
break;
default:
CONS_Alert(CONS_WARNING, "Bad level select init\n");
return;

View file

@ -958,9 +958,13 @@ void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 xoffset)
if (standings->rankingsmode)
{
if (standings->isduel)
if (standings->numplayers < 2)
;
else if (standings->isduel)
{
Y_DrawRankMode(BASEVIDWIDTH / 2 + xoffset, BASEVIDHEIGHT - 19, true);
x = BASEVIDWIDTH / 2 + xoffset;
y = roundqueue.size ? (BASEVIDHEIGHT/2) : (BASEVIDHEIGHT - 19);
Y_DrawRankMode(x, y, true);
}
else
{