| 2389 | } |
| 2390 | |
| 2391 | void UI_SetItemColor(itemDef_t *item,const char *itemname,const char *name,vec4_t color) |
| 2392 | { |
| 2393 | itemDef_t *item2; |
| 2394 | int i,j; |
| 2395 | vec4_t *out; |
| 2396 | int count = Menu_ItemsMatchingGroup((menuDef_t *) item->parent, itemname); |
| 2397 | |
| 2398 | for (j = 0; j < count; j++) |
| 2399 | { |
| 2400 | item2 = Menu_GetMatchingItemByNumber((menuDef_t *) item->parent, j, itemname); |
| 2401 | if (item2 != NULL) |
| 2402 | { |
| 2403 | out = NULL; |
| 2404 | if (Q_stricmp(name, "backcolor") == 0) |
| 2405 | { |
| 2406 | out = &item2->window.backColor; |
| 2407 | } |
| 2408 | else if (Q_stricmp(name, "forecolor") == 0) |
| 2409 | { |
| 2410 | out = &item2->window.foreColor; |
| 2411 | item2->window.flags |= WINDOW_FORECOLORSET; |
| 2412 | } |
| 2413 | else if (Q_stricmp(name, "bordercolor") == 0) |
| 2414 | { |
| 2415 | out = &item2->window.borderColor; |
| 2416 | } |
| 2417 | |
| 2418 | if (out) |
| 2419 | { |
| 2420 | for (i = 0; i < 4; i++) |
| 2421 | { |
| 2422 | (*out)[i] = color[i]; |
| 2423 | } |
| 2424 | } |
| 2425 | } |
| 2426 | } |
| 2427 | } |
| 2428 | |
| 2429 | /* |
| 2430 | ================= |
no test coverage detected