* Correctly grey out skin on MP charsel menu if skinchange is restricted.

* Also grey out colour if team gametype.
This commit is contained in:
toaster 2019-11-10 15:21:14 +00:00
parent 2f22547889
commit e388b34abe

View file

@ -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;