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

Function Menus_ShowItems

code/ui/ui_shared.cpp:11500–11519  ·  view source on GitHub ↗

================= Menus_ShowItems ================= */

Source from the content-addressed store, hash-verified

11498=================
11499*/
11500void Menus_ShowItems(const char *menuName)
11501{
11502 menuDef_t *menu;
11503 int i;
11504
11505 menu =Menus_FindByName(menuName); // Get menu
11506
11507 if (!menu)
11508 {
11509 Com_Printf(S_COLOR_YELLOW"WARNING: No menu was found. Could not show items.\n");
11510 return;
11511 }
11512
11513 menu->window.flags |= (WINDOW_HASFOCUS | WINDOW_VISIBLE);
11514
11515 for (i = 0; i < menu->itemCount; i++)
11516 {
11517 menu->items[i]->cvarFlags = CVAR_SHOW;
11518 }
11519}
11520
11521/*
11522=================

Callers 1

Script_ShowMenuFunction · 0.85

Calls 2

Menus_FindByNameFunction · 0.70
Com_PrintfFunction · 0.50

Tested by

no test coverage detected