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

Function Script_SetItemColor

code/ui/ui_shared.cpp:2434–2453  ·  view source on GitHub ↗

================= Script_SetItemColor ================= */

Source from the content-addressed store, hash-verified

2432=================
2433*/
2434qboolean Script_SetItemColor(itemDef_t *item, const char **args)
2435{
2436 const char *itemname;
2437 const char *name;
2438 vec4_t color;
2439
2440 // expecting type of color to set and 4 args for the color
2441 if (String_Parse(args, &itemname) && String_Parse(args, &name))
2442 {
2443 if (COM_ParseVec4(args, &color))
2444 {
2445 return qtrue;
2446 }
2447
2448 UI_SetItemColor(item,itemname,name,color);
2449
2450 }
2451
2452 return qtrue;
2453}
2454
2455/*
2456=================

Callers

nothing calls this directly

Calls 3

UI_SetItemColorFunction · 0.85
String_ParseFunction · 0.70
COM_ParseVec4Function · 0.50

Tested by

no test coverage detected