=============== Menu_GetMatchingItemByNumber =============== */
| 1484 | =============== |
| 1485 | */ |
| 1486 | itemDef_t *Menu_GetMatchingItemByNumber(menuDef_t *menu, int index, const char *name) |
| 1487 | { |
| 1488 | int i; |
| 1489 | int count = 0; |
| 1490 | for (i = 0; i < menu->itemCount; i++) |
| 1491 | { |
| 1492 | if (Q_stricmp(menu->items[i]->window.name, name) == 0 || (menu->items[i]->window.group && Q_stricmp(menu->items[i]->window.group, name) == 0)) |
| 1493 | { |
| 1494 | if (count == index) |
| 1495 | { |
| 1496 | return menu->items[i]; |
| 1497 | } |
| 1498 | count++; |
| 1499 | } |
| 1500 | } |
| 1501 | return NULL; |
| 1502 | } |
| 1503 | |
| 1504 | /* |
| 1505 | =============== |
no test coverage detected