mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix tabbing
This commit is contained in:
parent
1bce22cf72
commit
7a8dc91b6a
1 changed files with 84 additions and 85 deletions
169
src/m_menu.c
169
src/m_menu.c
|
|
@ -8541,114 +8541,113 @@ static void M_Setup4PControlsMenu(INT32 choice)
|
||||||
// Draws the Customise Controls menu
|
// Draws the Customise Controls menu
|
||||||
static void M_DrawControl(void)
|
static void M_DrawControl(void)
|
||||||
{
|
{
|
||||||
char tmp[50];
|
char tmp[50];
|
||||||
INT32 x, y, i, max, cursory = 0, iter;
|
INT32 x, y, i, max, cursory = 0, iter;
|
||||||
INT32 keys[2];
|
INT32 keys[2];
|
||||||
|
|
||||||
x = currentMenu->x;
|
x = currentMenu->x;
|
||||||
y = currentMenu->y;
|
y = currentMenu->y;
|
||||||
|
|
||||||
/*i = itemOn - (controlheight/2);
|
/*i = itemOn - (controlheight/2);
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
i = 0;
|
i = 0;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
iter = (controlheight/2);
|
iter = (controlheight/2);
|
||||||
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
|
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
|
||||||
{
|
{
|
||||||
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
|
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
|
||||||
iter--;
|
iter--;
|
||||||
}
|
}
|
||||||
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
iter += (controlheight/2);
|
iter += (controlheight/2);
|
||||||
for (max = itemOn; (iter && max < currentMenu->numitems); max++)
|
for (max = itemOn; (iter && max < currentMenu->numitems); max++)
|
||||||
{
|
{
|
||||||
if (currentMenu->menuitems[max].status != IT_GRAYEDOUT2)
|
if (currentMenu->menuitems[max].status != IT_GRAYEDOUT2)
|
||||||
iter--;
|
iter--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iter)
|
if (iter)
|
||||||
{
|
{
|
||||||
iter += (controlheight/2);
|
iter += (controlheight/2);
|
||||||
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
|
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
|
||||||
{
|
{
|
||||||
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
|
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
|
||||||
iter--;
|
iter--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*max = i + controlheight;
|
/*max = i + controlheight;
|
||||||
if (max > currentMenu->numitems)
|
if (max > currentMenu->numitems)
|
||||||
{
|
{
|
||||||
max = currentMenu->numitems;
|
max = currentMenu->numitems;
|
||||||
if (max < controlheight)
|
if (max < controlheight)
|
||||||
i = 0;
|
i = 0;
|
||||||
else
|
else
|
||||||
i = max - controlheight;
|
i = max - controlheight;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// draw title (or big pic)
|
// draw title (or big pic)
|
||||||
M_DrawMenuTitle();
|
M_DrawMenuTitle();
|
||||||
|
|
||||||
M_CentreText(28,
|
M_CentreText(28,
|
||||||
(setupcontrols_fourthplayer ? "\x86""Set controls for ""\x82""Player 4" :
|
(setupcontrols_fourthplayer ? "\x86""Set controls for ""\x82""Player 4" :
|
||||||
(setupcontrols_thirdplayer ? "\x86""Set controls for ""\x82""Player 3" :
|
(setupcontrols_thirdplayer ? "\x86""Set controls for ""\x82""Player 3" :
|
||||||
(setupcontrols_secondaryplayer ? "\x86""Set controls for ""\x82""Player 2" :
|
(setupcontrols_secondaryplayer ? "\x86""Set controls for ""\x82""Player 2" :
|
||||||
"\x86""Press ""\x82""ENTER""\x86"" to change, ""\x82""BACKSPACE""\x86"" to clear"))));
|
"\x86""Press ""\x82""ENTER""\x86"" to change, ""\x82""BACKSPACE""\x86"" to clear"))));
|
||||||
|
|
||||||
if (i)
|
if (i)
|
||||||
V_DrawString(currentMenu->x - 16, y-(skullAnimCounter/5), highlightflags, "\x1A"); // up arrow
|
V_DrawString(currentMenu->x - 16, y-(skullAnimCounter/5), highlightflags, "\x1A"); // up arrow
|
||||||
if (max != currentMenu->numitems)
|
if (max != currentMenu->numitems)
|
||||||
V_DrawString(currentMenu->x - 16, y+(SMALLLINEHEIGHT*(controlheight-1))+(skullAnimCounter/5), highlightflags, "\x1B"); // down arrow
|
V_DrawString(currentMenu->x - 16, y+(SMALLLINEHEIGHT*(controlheight-1))+(skullAnimCounter/5), highlightflags, "\x1B"); // down arrow
|
||||||
|
|
||||||
for (; i < max; i++)
|
for (; i < max; i++)
|
||||||
{
|
{
|
||||||
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (i == itemOn)
|
if (i == itemOn)
|
||||||
cursory = y;
|
cursory = y;
|
||||||
|
|
||||||
if (currentMenu->menuitems[i].status == IT_CONTROL)
|
if (currentMenu->menuitems[i].status == IT_CONTROL)
|
||||||
{
|
{
|
||||||
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
|
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
|
||||||
keys[0] = setupcontrols[currentMenu->menuitems[i].alphaKey][0];
|
keys[0] = setupcontrols[currentMenu->menuitems[i].alphaKey][0];
|
||||||
keys[1] = setupcontrols[currentMenu->menuitems[i].alphaKey][1];
|
keys[1] = setupcontrols[currentMenu->menuitems[i].alphaKey][1];
|
||||||
|
|
||||||
tmp[0] ='\0';
|
tmp[0] ='\0';
|
||||||
if (keys[0] == KEY_NULL && keys[1] == KEY_NULL)
|
if (keys[0] == KEY_NULL && keys[1] == KEY_NULL)
|
||||||
{
|
{
|
||||||
strcpy(tmp, "---");
|
strcpy(tmp, "---");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (keys[0] != KEY_NULL)
|
if (keys[0] != KEY_NULL)
|
||||||
strcat (tmp, G_KeynumToString (keys[0]));
|
strcat (tmp, G_KeynumToString (keys[0]));
|
||||||
|
|
||||||
if (keys[0] != KEY_NULL && keys[1] != KEY_NULL)
|
if (keys[0] != KEY_NULL && keys[1] != KEY_NULL)
|
||||||
strcat(tmp,", ");
|
strcat(tmp,", ");
|
||||||
|
|
||||||
if (keys[1] != KEY_NULL)
|
if (keys[1] != KEY_NULL)
|
||||||
strcat (tmp, G_KeynumToString (keys[1]));
|
strcat (tmp, G_KeynumToString (keys[1]));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
V_DrawRightAlignedString(BASEVIDWIDTH-currentMenu->x, y, highlightflags, tmp);
|
||||||
V_DrawRightAlignedString(BASEVIDWIDTH-currentMenu->x, y, highlightflags, tmp);
|
}
|
||||||
}
|
/*else if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
||||||
/*else if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);*/
|
||||||
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);*/
|
else if ((currentMenu->menuitems[i].status == IT_HEADER) && (i != max-1))
|
||||||
else if ((currentMenu->menuitems[i].status == IT_HEADER) && (i != max-1))
|
|
||||||
V_DrawString(19, y+6, highlightflags, currentMenu->menuitems[i].text);
|
V_DrawString(19, y+6, highlightflags, currentMenu->menuitems[i].text);
|
||||||
else if (currentMenu->menuitems[i].status & IT_STRING)
|
else if (currentMenu->menuitems[i].status & IT_STRING)
|
||||||
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
|
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
|
||||||
|
|
||||||
y += SMALLLINEHEIGHT;
|
y += SMALLLINEHEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawScaledPatch(currentMenu->x - 20, cursory, 0,
|
V_DrawScaledPatch(currentMenu->x - 20, cursory, 0,
|
||||||
W_CachePatchName("M_CURSOR", PU_CACHE));
|
W_CachePatchName("M_CURSOR", PU_CACHE));
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef controlheight
|
#undef controlheight
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue