================ MenuParse_itemDef ================ */
| 1138 | ================ |
| 1139 | */ |
| 1140 | qboolean MenuParse_itemDef( itemDef_t *item ) |
| 1141 | { |
| 1142 | menuDef_t *menu = (menuDef_t*)item; |
| 1143 | if (menu->itemCount < MAX_MENUITEMS) |
| 1144 | { |
| 1145 | itemDef_t *newItem = menu->items[menu->itemCount] = (struct itemDef_s *) UI_Alloc(sizeof(itemDef_t)); |
| 1146 | Item_Init(newItem); |
| 1147 | if (!Item_Parse(newItem)) |
| 1148 | { |
| 1149 | return qfalse; |
| 1150 | } |
| 1151 | Item_InitControls( newItem ); |
| 1152 | newItem->parent = menu->items[menu->itemCount]->parent = menu; |
| 1153 | menu->itemCount++; |
| 1154 | Item_ApplyHacks( newItem ); |
| 1155 | } |
| 1156 | else |
| 1157 | { |
| 1158 | PC_ParseWarning(va("Exceeded item/menu max of %d", MAX_MENUITEMS)); |
| 1159 | } |
| 1160 | return qtrue; |
| 1161 | } |
| 1162 | |
| 1163 | #define KEYWORDHASH_SIZE 512 |
| 1164 |
nothing calls this directly
no test coverage detected