MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Menus_HideItems

Function Menus_HideItems

code/ui/ui_shared.cpp:11474–11493  ·  view source on GitHub ↗

================= Menus_HideItems ================= */

Source from the content-addressed store, hash-verified

11472=================
11473*/
11474void Menus_HideItems(const char *menuName)
11475{
11476 menuDef_t *menu;
11477 int i;
11478
11479 menu =Menus_FindByName(menuName); // Get menu
11480
11481 if (!menu)
11482 {
11483 Com_Printf(S_COLOR_YELLOW"WARNING: No menu was found. Could not hide items.\n");
11484 return;
11485 }
11486
11487 menu->window.flags &= ~(WINDOW_HASFOCUS | WINDOW_VISIBLE);
11488
11489 for (i = 0; i < menu->itemCount; i++)
11490 {
11491 menu->items[i]->cvarFlags = CVAR_HIDE;
11492 }
11493}
11494
11495/*
11496=================

Callers

nothing calls this directly

Calls 2

Menus_FindByNameFunction · 0.70
Com_PrintfFunction · 0.50

Tested by

no test coverage detected