|
UFO: Alien Invasion
|

Go to the source code of this file.
Data Structures | |
| class | uiContainerNode |
| struct | containerExtraData_t |
| extradata for container widget More... | |
Macros | |
| #define | C_UNIT 25 |
| One unit in the containers is 25x25. | |
Functions | |
| void | UI_RegisterContainerNode (uiBehaviour_t *behaviour) |
| 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 | UI_ContainerNodeUpdateEquipment (Inventory *inv, const equipDef_t *ed) |
| Fills the ground container of the ui_inventory with unused items from a given equipment definition. | |
| uiNode_t * | UI_GetContainerNodeByContainerIDX (const uiNode_t *const parent, const int index) |
| Search a child container node by the given container id. | |
| void | UI_ContainerNodeAutoPlaceItem (uiNode_t *node, Item *ic) |
| Try to autoplace an item from a container. | |
| void | UI_GetItemTooltip (const Item &item, char *tooltipText, size_t stringMaxLength) |
| Generate tooltip text for an item. | |
Variables | |
| Inventory * | ui_inventory |
| #define C_UNIT 25 |
One unit in the containers is 25x25.
Definition at line 28 of file ui_node_container.h.
Referenced by uiContainerNode::onDndMove(), uiContainerNode::onLoaded(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_ContainerNodeDrawDropPreview(), UI_ContainerNodeDrawFreeSpace(), UI_ContainerNodeGetItemAtPosition(), and UI_DrawItem().
Try to autoplace an item from a container.
| [in] | node | The context node |
| [in] | ic | An item from the node container |
Definition at line 687 of file ui_node_container.cpp.
References Item::ammoDef(), CID_ARMOUR, CID_BACKPACK, CID_BELT, CID_EQUIP, CID_HEADGEAR, CID_HOLSTER, CID_IMPLANT, CID_LEFT, CID_RIGHT, Item::def(), EXTRADATA, Item::getAmmoLeft(), objDef_t::headgear, i, invDef_t::id, objDef_t::idx, objDef_t::implant, INV_LoadWeapon(), INV_MoveItem(), INV_UnloadWeapon(), INVDEF, objDef_t::isAmmo(), Item::isArmour(), Item::isWeapon(), lengthof, uiNode_t::lua_onChange, NONE, uiNode_t::onChange, uiNode_t::parent, uiNode_t::root, targetNode, UI_ContainerNodeAddItem(), UI_ExecuteEventActions(), UI_ExecuteLuaEventScript(), UI_GetContainerNodeByContainerIDX(), UI_GetNode(), ui_inventory, and objDef_t::weapons.
Referenced by UI_ContainerNodeAutoPlace(), and UI_ContainerNodeAutoPlace().
| void UI_ContainerNodeUpdateEquipment | ( | Inventory * | inv, |
| const equipDef_t * | ed ) |
Fills the ground container of the ui_inventory with unused items from a given equipment definition.
ui_inventory pointer must be set | [in,out] | inv | The inventory to add the unused items from ed to |
| [in] | ed | The equipment definition to get the used items from that should be added to the ground container of inv |
Definition at line 102 of file ui_node_container.cpp.
References CID_EQUIP, cls, csi, Item::def(), FILTER_AIRCRAFT, GAME_ItemIsUseable(), Inventory::getEquipContainer(), i, objDef_t::idx, INVDEF, INVSH_GetItemByIDX(), lengthof, MAX_CONTAINERS, Mem_Dup, Mem_Free, NONE, equipDef_t::numItems, and ui_inventory.
Referenced by GAME_GetImportData(), and GAME_UpdateInventory().
| 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.
| [in] | node | Context node |
| [in] | org | Node position on the screen (pixel). Single nodes: Use the center of the node. |
| [in] | item | The item to draw. |
| [in] | x,y | Position in container. Set both to -1 if it's drawn in a single container. |
| [in] | scale | |
| [in] | color |
Definition at line 149 of file ui_node_container.cpp.
References modelInfo_t::angles, C_UNIT, modelInfo_t::center, objDef_t::center, modelInfo_t::color, Com_Printf(), Item::def(), GAME_GetModelForItem(), objDef_t::id, objDef_t::image, Item::mustReload(), modelInfo_t::name, OBJZERO, modelInfo_t::origin, Q_strnull(), R_Color(), R_DrawModelDirect(), Item::rotated, modelInfo_t::scale, objDef_t::scale, scale, objDef_t::sx, objDef_t::sy, UI_DrawModelNode(), UI_DrawNormImageByName(), Vector4Copy, VectorCopy, VectorNegate, VectorScale, and objDef_t::weapon.
Referenced by uiItemNode::draw(), UI_BaseInventoryNodeDrawItems(), UI_ContainerNodeDrawDropPreview(), UI_ContainerNodeDrawGrid(), UI_ContainerNodeDrawSingle(), and UI_DrawDragAndDrop().
Search a child container node by the given container id.
Definition at line 290 of file ui_node_container.cpp.
References index, INVDEF, invDef_t::name, and UI_GetNode().
Referenced by UI_ContainerNodeAutoPlaceItem().
Generate tooltip text for an item.
| [in] | item | The item we want to generate the tooltip text for. |
| [in,out] | tooltipText | Pointer to a string the information should be written into. |
| [in] | stringMaxLength | Max. string size of tooltipText. |
Definition at line 247 of file ui_node_container.cpp.
References _, Item::ammoDef(), Com_sprintf(), Item::def(), GAME_ItemIsUseable(), Item::getAmmoLeft(), Item::getAmount(), i, Item::isWeapon(), objDef_t::name, objDef_t::numWeapons, Q_strcat(), and objDef_t::weapons.
Referenced by uiBaseInventoryNode::drawTooltip(), and uiContainerNode::drawTooltip().
| void UI_RegisterContainerNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 1072 of file ui_node_container.cpp.
References EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_RegisterExtradataNodeProperty, UI_SWIG_TypeQuery(), V_INT, and V_UI_ACTION.
|
extern |
Definition at line 62 of file ui_node_container.cpp.
Referenced by CL_ActorSelect(), uiBaseInventoryNode::draw(), uiContainerNode::draw(), GAME_ActorSelect_f(), GAME_GetImportData(), GAME_UpdateInventory(), uiContainerNode::onDndFinished(), uiContainerNode::onDndMove(), UI_ContainerNodeAddItem(), UI_ContainerNodeAutoPlace(), UI_ContainerNodeAutoPlace(), UI_ContainerNodeAutoPlaceItem(), UI_ContainerNodeDrawDropPreview(), UI_ContainerNodeDrawGrid(), UI_ContainerNodeDrawSingle(), UI_ContainerNodeGetExistingItem(), UI_ContainerNodeGetItemAtPosition(), and UI_ContainerNodeUpdateEquipment().