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

Function Menu_ItemsMatchingGroup

code/ui/ui_shared.cpp:1459–1479  ·  view source on GitHub ↗

=============== Menu_ItemsMatchingGroup =============== */

Source from the content-addressed store, hash-verified

1457===============
1458*/
1459int Menu_ItemsMatchingGroup(menuDef_t *menu, const char *name)
1460{
1461 int i;
1462 int count = 0;
1463
1464 for (i = 0; i < menu->itemCount; i++)
1465 {
1466 if ((!menu->items[i]->window.name) && (!menu->items[i]->window.group))
1467 {
1468 Com_Printf(S_COLOR_YELLOW"WARNING: item has neither name or group\n");
1469 continue;
1470 }
1471
1472 if (Q_stricmp(menu->items[i]->window.name, name) == 0 || (menu->items[i]->window.group && Q_stricmp(menu->items[i]->window.group, name) == 0))
1473 {
1474 count++;
1475 }
1476 }
1477
1478 return count;
1479}
1480
1481/*
1482===============

Callers 11

Menu_FadeItemByNameFunction · 0.70
Menu_ShowItemByNameFunction · 0.70
Menu_SetItemBackgroundFunction · 0.70
Menu_SetItemTextFunction · 0.70
Menu_OrbitItemByNameFunction · 0.70
Menu_ItemDisableFunction · 0.70
Script_SetItemRectFunction · 0.70
UI_SetItemVisibleFunction · 0.70
UI_SetItemColorFunction · 0.70

Calls 2

Q_stricmpFunction · 0.85
Com_PrintfFunction · 0.50

Tested by

no test coverage detected