ui_node_container.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  containerExtraData_s
 extradata for container widget More...

Defines

#define C_UNIT   25
 One unit in the containers is 25x25.

Typedefs

typedef struct containerExtraData_s containerExtraData_t
 extradata for container widget

Functions

void UI_RegisterContainerNode (struct uiBehaviour_s *behaviour)
void UI_DrawItem (struct uiNode_s *node, const vec3_t org, const struct item_s *item, int x, int y, const vec3_t scale, const vec4_t color)
void UI_ContainerNodeUpdateEquipment (inventory_t *inv, equipDef_t *ed)
 Fills the ground container of the ui_inventory with unused items from a given equipment definition.

Variables

inventory_tui_inventory

Detailed Description

Definition in file ui_node_container.h.


Define Documentation

#define C_UNIT   25

Typedef Documentation

extradata for container widget

Note:
everything is not used by all container's type (grid, single, scrolled)

Function Documentation

void UI_ContainerNodeUpdateEquipment ( inventory_t inv,
equipDef_t ed 
)

Fills the ground container of the ui_inventory with unused items from a given equipment definition.

Note:
Keep in mind that ed is changed here - so items are removed and the ground container of a inventory definition is in general a temp container - that means you should make a copy of the equipDef_t you want to add to the temp ground container of the given inv
Todo:
it's not obvious for the caller that ui_inventory pointer must be set
Parameters:
[in,out] inv The inventory to add the unused items from ed to
[in,out] ed The equipment definition to get the used items from that should be added to the ground container of inv
Todo:
dont use, and dont called by the container node; should we move it outside?

Definition at line 130 of file ui_node_container.c.

References inventoryInterface_s::AddToInventory, inventory_s::c, cls, csi, FILTER_AIRCRAFT, GAME_ItemIsUseable(), client_static_s::i, i, csi_s::idEquip, objDef_s::idx, INVDEF, INVSH_GetItemByIDX(), MAX_CONTAINERS, NONE, NONE_AMMO, equipDef_s::numItems, csi_s::numODs, and item_s::t.

Referenced by CL_UpdateEquipmentMenuParameters_f(), and MP_GetEquipment().

void UI_DrawItem ( struct uiNode_s node,
const vec3_t  org,
const struct item_s item,
int  x,
int  y,
const vec3_t  scale,
const vec4_t  color 
)
void UI_RegisterContainerNode ( struct uiBehaviour_s behaviour  ) 

Variable Documentation

Todo:
need refactoring to remove, reduce use... of that var Global access to many node content like that is very bad.

Definition at line 59 of file ui_node_container.c.

Referenced by CL_ActorEquipmentSelect_f(), CL_ActorSelect(), CL_UpdateEquipmentMenuParameters_f(), MP_GetEquipment(), UI_BaseInventoryNodeDraw(), UI_ContainerNodeAutoPlace(), and UI_ContainerNodeGetExistingItem().


Generated by  doxygen 1.6.2