Make join requests options on pause menu selectable even if you're already in the menu

This commit is contained in:
James R 2020-08-22 17:16:49 -07:00
parent 805fb01df9
commit 89ba08a376
3 changed files with 18 additions and 3 deletions

View file

@ -276,6 +276,7 @@ static void DRPC_HandleJoinRequest(const DiscordUser *requestUser)
else
{
discordRequestList = newRequest;
M_RefreshPauseMenu();
}
// Made it to the end, request was valid, so play the request sound :)

View file

@ -3348,10 +3348,8 @@ void M_StartControlPanel(void)
MPauseMenu[i].alphaKey -= 8;
MPauseMenu[mpause_discordrequests].alphaKey = MPauseMenu[i].alphaKey;
MPauseMenu[mpause_discordrequests].status = IT_GRAYEDOUT;
if (discordRequestList != NULL)
MPauseMenu[mpause_discordrequests].status = IT_STRING | IT_SUBMENU;
M_RefreshPauseMenu();
}
#endif
@ -6370,6 +6368,20 @@ static void M_SelectableClearMenus(INT32 choice)
M_ClearMenus(true);
}
void M_RefreshPauseMenu(void)
{
#ifdef HAVE_DISCORDRPC
if (discordRequestList != NULL)
{
MPauseMenu[mpause_discordrequests].status = IT_STRING | IT_SUBMENU;
}
else
{
MPauseMenu[mpause_discordrequests].status = IT_GRAYEDOUT;
}
#endif
}
// ======
// CHEATS
// ======

View file

@ -267,6 +267,8 @@ void Addons_option_Onchange(void);
void M_ReplayHut(INT32 choice);
void M_SetPlaybackMenuPointer(void);
void M_RefreshPauseMenu(void);
INT32 HU_GetHighlightColor(void);
// These defines make it a little easier to make menus