27 #include "../ui_nodes.h"
28 #include "../ui_parse.h"
29 #include "../ui_behaviour.h"
35 #include "../../../common/scripts_lua.h"
37 #include "../../cgame/cl_game.h"
38 #include "../../renderer/r_draw.h"
40 #define EXTRADATA(node) UI_EXTRADATA(node, modelExtraData_t)
59 Item item(od,
nullptr, 1);
63 const vec4_t color = {1, 1, 1, 1};
68 itemNodePos[0] += node->
box.
size[0] / 2.0;
69 itemNodePos[1] += node->
box.
size[1] / 2.0;
83 behaviour->
name =
"item";
bool Q_strnull(const char *string)
const objDef_t * INVSH_GetItemByIDSilent(const char *id)
Returns the item that belongs to the given id or nullptr if it wasn't found.
static const vec3_t scale
void UI_DrawModelNode(uiNode_t *node, const char *source)
void UI_RegisterItemNode(uiBehaviour_t *behaviour)
const objDef_t * def(void) const
void draw(uiNode_t *node) override
Draw an item node.
Defines all attributes of objects used in the inventory.
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
item instance data, with linked list capability
const char * GAME_GetModelForItem(const objDef_t *od, uiModel_t **uiModel)
Get a model for an item.
SharedPtr< uiNode > UINodePtr
const char * UI_GetReferenceString(const uiNode_t *const node, const char *ref)
Atomic structure used to define most of the UI.
void * UI_SWIG_TypeQuery(const char *name)
This function queries the SWIG type table for a type information structure. It is used in combination...
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
node behaviour, how a node work
void GAME_DisplayItemInfo(uiNode_t *node, const char *string)
Shows game type specific item information (if it's not resolvable via objDef_t).
void UI_DrawItem(uiNode_t *node, const vec3_t org, const Item *item, int x, int y, const vec3_t scale, const vec4_t color)
Draws an item to the screen.
void R_CleanupDepthBuffer(int x, int y, int width, int height)
"Clean up" the depth buffer into a rect