From e388b34abeb5624198bdbba09e2ca1c7f96b4e79 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 10 Nov 2019 15:21:14 +0000 Subject: [PATCH] * Correctly grey out skin on MP charsel menu if skinchange is restricted. * Also grey out colour if team gametype. --- src/m_menu.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 20aec7a01..c7f9fb66f 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -10091,10 +10091,10 @@ static void M_DrawSetupMultiPlayerMenu(void) // draw skin string V_DrawRightAlignedString(BASEVIDWIDTH - x, y, - ((MP_PlayerSetupMenu[2].status & IT_TYPE) == IT_SPACE ? V_TRANSLUCENT : 0)|(itemOn == 1 ? V_YELLOWMAP : 0)|V_ALLOWLOWERCASE, + ((MP_PlayerSetupMenu[1].status & IT_TYPE) == IT_SPACE ? V_TRANSLUCENT : 0)|(itemOn == 1 ? V_YELLOWMAP : 0)|V_ALLOWLOWERCASE, skins[setupm_fakeskin].realname); - if (itemOn == 1 && (MP_PlayerSetupMenu[2].status & IT_TYPE) != IT_SPACE) + if (itemOn == 1 && (MP_PlayerSetupMenu[1].status & IT_TYPE) != IT_SPACE) { V_DrawCharacter(BASEVIDWIDTH - x - 10 - V_StringWidth(skins[setupm_fakeskin].realname, V_ALLOWLOWERCASE) - (skullAnimCounter/5), y, '\x1C' | V_YELLOWMAP, false); @@ -10168,7 +10168,7 @@ colordraw: // draw color string V_DrawRightAlignedString(BASEVIDWIDTH - x, y, - (itemOn == 2 ? V_YELLOWMAP : 0)|V_ALLOWLOWERCASE, + ((MP_PlayerSetupMenu[2].status & IT_TYPE) == IT_SPACE ? V_TRANSLUCENT : 0)|(itemOn == 2 ? V_YELLOWMAP : 0)|V_ALLOWLOWERCASE, Color_Names[setupm_fakecolor]); if (itemOn == 2 && (MP_PlayerSetupMenu[2].status & IT_TYPE) != IT_SPACE) @@ -10388,6 +10388,12 @@ static void M_SetupMultiPlayer(INT32 choice) else MP_PlayerSetupMenu[1].status = (IT_KEYHANDLER|IT_STRING); + // ditto with colour + if (Playing() && G_GametypeHasTeams()) + MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT); + else + MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER|IT_STRING); + multi_spr2 = P_GetSkinSprite2(&skins[setupm_fakeskin], SPR2_WALK, NULL); MP_PlayerSetupDef.prevMenu = currentMenu; @@ -10424,6 +10430,12 @@ static void M_SetupMultiPlayer2(INT32 choice) else MP_PlayerSetupMenu[1].status = (IT_KEYHANDLER | IT_STRING); + // ditto with colour + if (Playing() && G_GametypeHasTeams()) + MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT); + else + MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER|IT_STRING); + multi_spr2 = P_GetSkinSprite2(&skins[setupm_fakeskin], SPR2_WALK, NULL); MP_PlayerSetupDef.prevMenu = currentMenu;