mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Menus: Hide blank cheats
git-svn-id: https://svn.eduke32.com/eduke32@6678 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
26749bf881
commit
5bd6f6e28f
1 changed files with 10 additions and 10 deletions
|
@ -1998,6 +1998,14 @@ static void Menu_Pre(MenuID_t cm)
|
||||||
{
|
{
|
||||||
const int32_t menucheatsdisabled = numplayers != 1 || !(g_player[myconnectindex].ps->gm & MODE_GAME);
|
const int32_t menucheatsdisabled = numplayers != 1 || !(g_player[myconnectindex].ps->gm & MODE_GAME);
|
||||||
|
|
||||||
|
// refresh display names of quote cheats
|
||||||
|
if (!DUKEBETA)
|
||||||
|
{
|
||||||
|
ME_CheatCodes[CHEATFUNC_QUOTEBETA].name = apStrings[QUOTE_CHEAT_BETA];
|
||||||
|
ME_CheatCodes[CHEATFUNC_QUOTETODD].name = NAM ? g_NAMMattCheatQuote : apStrings[QUOTE_CHEAT_TODD];
|
||||||
|
ME_CheatCodes[CHEATFUNC_QUOTEALLEN].name = apStrings[QUOTE_CHEAT_ALLEN];
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUMCHEATFUNCS; i++)
|
for (i = 0; i < NUMCHEATFUNCS; i++)
|
||||||
{
|
{
|
||||||
uint32_t cheatmask = cl_cheatmask & (1<<i);
|
uint32_t cheatmask = cl_cheatmask & (1<<i);
|
||||||
|
@ -2029,21 +2037,13 @@ static void Menu_Pre(MenuID_t cm)
|
||||||
|
|
||||||
MenuEntry_t & entry = ME_CheatCodes[i];
|
MenuEntry_t & entry = ME_CheatCodes[i];
|
||||||
|
|
||||||
// only show cheats that have been typed in before
|
// only show cheats that have been typed in before and are not undefined
|
||||||
MenuEntry_HideOnCondition(&entry, !cheatmask);
|
MenuEntry_HideOnCondition(&entry, !cheatmask || CheatStrings[CheatFunctionIDs[i]][0] == '\0');
|
||||||
|
|
||||||
// disable outside of a single-player game
|
// disable outside of a single-player game
|
||||||
MenuEntry_DisableOnCondition(&entry, menucheatsdisabled);
|
MenuEntry_DisableOnCondition(&entry, menucheatsdisabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh display names of quote cheats
|
|
||||||
if (!DUKEBETA)
|
|
||||||
{
|
|
||||||
ME_CheatCodes[CHEATFUNC_QUOTEBETA].name = apStrings[QUOTE_CHEAT_BETA];
|
|
||||||
ME_CheatCodes[CHEATFUNC_QUOTETODD].name = NAM ? g_NAMMattCheatQuote : apStrings[QUOTE_CHEAT_TODD];
|
|
||||||
ME_CheatCodes[CHEATFUNC_QUOTEALLEN].name = apStrings[QUOTE_CHEAT_ALLEN];
|
|
||||||
}
|
|
||||||
|
|
||||||
MenuEntry_DisableOnCondition(&ME_ENTERCHEAT, (cl_cheatmask == UINT32_MAX));
|
MenuEntry_DisableOnCondition(&ME_ENTERCHEAT, (cl_cheatmask == UINT32_MAX));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue