mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Fix ONLINE menus
This commit is contained in:
parent
256ec0517f
commit
9eb7ae3cff
3 changed files with 32 additions and 44 deletions
|
|
@ -311,9 +311,12 @@ menuitem_t PLAY_MP_JoinIP[] =
|
||||||
{
|
{
|
||||||
//{IT_NOTHING | IT_KEYHANDLER, NULL, NULL, NULL, M_MPOptSelect, 0, 0},
|
//{IT_NOTHING | IT_KEYHANDLER, NULL, NULL, NULL, M_MPOptSelect, 0, 0},
|
||||||
|
|
||||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "IP: ", "Type the IPv4 address of the server then press enter to attempt connection.",
|
{IT_STRING | IT_CVAR | IT_CV_STRING, "IP: ", "Type the IPv4 address of the server.",
|
||||||
NULL, {.cvar = &cv_dummyip}, 0, 0},
|
NULL, {.cvar = &cv_dummyip}, 0, 0},
|
||||||
|
|
||||||
|
{IT_STRING, "CONNECT ", "Attempt to connect to the server you entered the IP for.",
|
||||||
|
NULL, NULL, 0, 0},
|
||||||
|
|
||||||
{IT_STRING | IT_SPACE, "LAST IPs JOINED:", "Kanade best waifu :)",
|
{IT_STRING | IT_SPACE, "LAST IPs JOINED:", "Kanade best waifu :)",
|
||||||
NULL, {NULL}, 0, 0},
|
NULL, {NULL}, 0, 0},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2149,12 +2149,12 @@ void M_DrawMPHost(void)
|
||||||
void M_DrawMPJoinIP(void)
|
void M_DrawMPJoinIP(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
patch_t *minibutt = W_CachePatchName("M_SBUTT", PU_CACHE);
|
//patch_t *minibutt = W_CachePatchName("M_SBUTT", PU_CACHE);
|
||||||
// There is no such things as mini butts, only thick thighs to rest your head on.
|
// There is no such things as mini butts, only thick thighs to rest your head on.
|
||||||
patch_t *minigo = W_CachePatchName("M_SGO", PU_CACHE);
|
//patch_t *minigo = W_CachePatchName("M_SGO", PU_CACHE);
|
||||||
patch_t *typebar = W_CachePatchName("M_TYPEB", PU_CACHE);
|
patch_t *typebar = W_CachePatchName("M_TYPEB", PU_CACHE);
|
||||||
|
|
||||||
UINT8 *colormap = NULL;
|
//UINT8 *colormap = NULL;
|
||||||
UINT8 *colormapc = NULL;
|
UINT8 *colormapc = NULL;
|
||||||
|
|
||||||
INT32 xp = 73, yp = 133, i = 0; // Starting position for the text drawing.
|
INT32 xp = 73, yp = 133, i = 0; // Starting position for the text drawing.
|
||||||
|
|
@ -2185,7 +2185,7 @@ void M_DrawMPJoinIP(void)
|
||||||
strcpy(str, "---"); // If that fails too then there's nothing!
|
strcpy(str, "---"); // If that fails too then there's nothing!
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawString(xp, yp, V_ALLOWLOWERCASE | (i == itemOn ? highlightflags : 0), str);
|
V_DrawString(xp, yp, V_ALLOWLOWERCASE | ((i == itemOn || currentMenu->menuitems[i].status & IT_SPACE) ? highlightflags : 0), str);
|
||||||
|
|
||||||
// Cvar specific handling
|
// Cvar specific handling
|
||||||
switch (currentMenu->menuitems[i].status & IT_TYPE)
|
switch (currentMenu->menuitems[i].status & IT_TYPE)
|
||||||
|
|
@ -2197,7 +2197,7 @@ void M_DrawMPJoinIP(void)
|
||||||
{
|
{
|
||||||
case IT_CV_STRING:
|
case IT_CV_STRING:
|
||||||
|
|
||||||
colormap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_MOSS, GTC_CACHE);
|
//colormap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_MOSS, GTC_CACHE);
|
||||||
colormapc = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PLAGUE, GTC_CACHE);
|
colormapc = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PLAGUE, GTC_CACHE);
|
||||||
|
|
||||||
V_DrawFixedPatch((xp + 20)<<FRACBITS, (yp-3)<<FRACBITS, FRACUNIT, 0, typebar, colormapc); // Always consider that this is selected otherwise it clashes.
|
V_DrawFixedPatch((xp + 20)<<FRACBITS, (yp-3)<<FRACBITS, FRACUNIT, 0, typebar, colormapc); // Always consider that this is selected otherwise it clashes.
|
||||||
|
|
@ -2205,10 +2205,10 @@ void M_DrawMPJoinIP(void)
|
||||||
if (skullAnimCounter < 4 && i == itemOn)
|
if (skullAnimCounter < 4 && i == itemOn)
|
||||||
V_DrawCharacter(xp + 24 + V_ThinStringWidth(cv->string, 0), yp, '_' | 0x80, false);
|
V_DrawCharacter(xp + 24 + V_ThinStringWidth(cv->string, 0), yp, '_' | 0x80, false);
|
||||||
|
|
||||||
// On this specific menu the only time we'll ever see this is for the connect by IP typefield.
|
/*// On this specific menu the only time we'll ever see this is for the connect by IP typefield.
|
||||||
// Draw the small GO button here (and the text which is a separate graphic)
|
// Draw the small GO button here (and the text which is a separate graphic)
|
||||||
V_DrawFixedPatch((xp + 20 + typebar->width -4)<<FRACBITS, (yp-3)<<FRACBITS, FRACUNIT, 0, minibutt, i == itemOn ? colormapc : colormap);
|
V_DrawFixedPatch((xp + 20 + typebar->width -4)<<FRACBITS, (yp-3)<<FRACBITS, FRACUNIT, 0, minibutt, i == itemOn ? colormapc : colormap);
|
||||||
V_DrawFixedPatch((xp + 20 + typebar->width -4 + (minibutt->width/2))<<FRACBITS, (yp-3-5)<<FRACBITS, FRACUNIT, 0, minigo, i == itemOn ? colormapc : NULL);
|
V_DrawFixedPatch((xp + 20 + typebar->width -4 + (minibutt->width/2))<<FRACBITS, (yp-3-5)<<FRACBITS, FRACUNIT, 0, minigo, i == itemOn ? colormapc : NULL);*/
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3633,7 +3633,7 @@ boolean M_MPResetOpts(void)
|
||||||
|
|
||||||
void M_MPOptSelectInit(INT32 choice)
|
void M_MPOptSelectInit(INT32 choice)
|
||||||
{
|
{
|
||||||
INT16 arrcpy[3][3] = {{0,68,0}, {0,12,0}, {0,64,0}};
|
INT16 arrcpy[3][3] = {{0,68,0}, {0,12,0}, {0,74,0}};
|
||||||
UINT8 i = 0, j = 0; // To copy the array into the struct
|
UINT8 i = 0, j = 0; // To copy the array into the struct
|
||||||
const UINT8 pid = 0;
|
const UINT8 pid = 0;
|
||||||
|
|
||||||
|
|
@ -3748,29 +3748,24 @@ void M_JoinIP(const char *ipa)
|
||||||
|
|
||||||
boolean M_JoinIPInputs(INT32 ch)
|
boolean M_JoinIPInputs(INT32 ch)
|
||||||
{
|
{
|
||||||
if (itemOn == 0) // connect field
|
|
||||||
|
const UINT8 pid = 0;
|
||||||
|
(void) ch;
|
||||||
|
|
||||||
|
if (itemOn == 1) // connect field
|
||||||
{
|
{
|
||||||
// enter: connect
|
// enter: connect
|
||||||
if (ch == KEY_ENTER)
|
if (M_MenuConfirmPressed(pid))
|
||||||
{
|
{
|
||||||
M_JoinIP(cv_dummyip.string);
|
M_JoinIP(cv_dummyip.string);
|
||||||
|
M_SetMenuDelay(pid);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ctrl+v -> copy paste!
|
|
||||||
else if (ctrldown && (ch == 'v' || ch == 'V'))
|
|
||||||
{
|
|
||||||
const char *paste = I_ClipboardPaste();
|
|
||||||
UINT16 i;
|
|
||||||
for (i=0; i < strlen(paste); i++)
|
|
||||||
M_ChangeStringCvar(paste[i]); // We can afford to do this since we're currently on that cvar.
|
|
||||||
|
|
||||||
return true; // Don't input the V obviously lol.
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (currentMenu->numitems - itemOn <= NUMLOGIP && ch == KEY_ENTER) // On one of the last 3 options for IP rejoining
|
else if (currentMenu->numitems - itemOn <= NUMLOGIP && M_MenuConfirmPressed(pid)) // On one of the last 3 options for IP rejoining
|
||||||
{
|
{
|
||||||
UINT8 index = NUMLOGIP - (currentMenu->numitems - itemOn);
|
UINT8 index = NUMLOGIP - (currentMenu->numitems - itemOn);
|
||||||
|
M_SetMenuDelay(pid);
|
||||||
|
|
||||||
// Is there an address at this part of the table?
|
// Is there an address at this part of the table?
|
||||||
if (joinedIPlist[index][0] && strlen(joinedIPlist[index][0]))
|
if (joinedIPlist[index][0] && strlen(joinedIPlist[index][0]))
|
||||||
|
|
@ -3788,29 +3783,19 @@ boolean M_JoinIPInputs(INT32 ch)
|
||||||
|
|
||||||
void M_MPRoomSelect(INT32 choice)
|
void M_MPRoomSelect(INT32 choice)
|
||||||
{
|
{
|
||||||
|
const UINT8 pid = 0;
|
||||||
|
(void) choice;
|
||||||
|
|
||||||
switch (choice)
|
if (menucmd[pid].dpad_lr)
|
||||||
{
|
{
|
||||||
|
mpmenu.room = (!mpmenu.room) ? 1 : 0;
|
||||||
case KEY_LEFTARROW:
|
S_StartSound(NULL, sfx_s3k5b);
|
||||||
case KEY_RIGHTARROW:
|
M_SetMenuDelay(pid);
|
||||||
{
|
}
|
||||||
|
else if (M_MenuBackPressed(pid))
|
||||||
mpmenu.room = (!mpmenu.room) ? 1 : 0;
|
{
|
||||||
S_StartSound(NULL, sfx_s3k5b);
|
M_GoBack(0);
|
||||||
|
M_SetMenuDelay(pid);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case KEY_ESCAPE:
|
|
||||||
{
|
|
||||||
if (currentMenu->prevMenu)
|
|
||||||
M_SetupNextMenu(currentMenu->prevMenu, false);
|
|
||||||
else
|
|
||||||
M_ClearMenus(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue