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

Function UI_SetItemVisible

code/ui/ui_shared.cpp:2368–2389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2366}
2367
2368void UI_SetItemVisible(menuDef_t *menu,const char *itemname,qboolean visible)
2369{
2370 itemDef_t *item;
2371 int j;
2372 int count = Menu_ItemsMatchingGroup(menu, itemname);
2373
2374 for (j = 0; j < count; j++)
2375 {
2376 item = Menu_GetMatchingItemByNumber(menu, j, itemname);
2377 if (item != NULL)
2378 {
2379 if (visible==qtrue)
2380 {
2381 item->window.flags |= WINDOW_VISIBLE;
2382 }
2383 else
2384 {
2385 item->window.flags &= ~WINDOW_VISIBLE;
2386 }
2387 }
2388 }
2389}
2390
2391void UI_SetItemColor(itemDef_t *item,const char *itemname,const char *name,vec4_t color)
2392{

Callers 2

UI_ShutdownForceHelpFunction · 0.85
UI_WeaponHelpActiveFunction · 0.85

Calls 2

Menu_ItemsMatchingGroupFunction · 0.70

Tested by

no test coverage detected