|
UFO: Alien Invasion
|
#include "../../shared/ufotypes.h"

Go to the source code of this file.
Enumerations | |
| enum | uiDNDType_t { DND_NOTHING , DND_SOMETHING , DND_ITEM } |
Functions | |
| void | UI_DrawDragAndDrop (int mousePosX, int mousePosY) |
| Draw to dragging object and catch mouse move event. | |
| void | UI_DNDDragItem (uiNode_t *node, const Item *item) |
| Start to drag an item. | |
| void | UI_DNDDrop (void) |
| Drop the object at the current position. | |
| void | UI_DNDAbort (void) |
| Drop the object at the current position. | |
| bool | UI_DNDIsDragging (void) |
| Return true if we are dragging something. | |
| bool | UI_DNDIsTargetNode (uiNode_t *node) |
| Return true if the requested node is the current target of the DND. | |
| bool | UI_DNDIsSourceNode (uiNode_t *node) |
| Return true if the requested node is the source of the DND. | |
| uiNode_t * | UI_DNDGetTargetNode (void) |
| Return target of the DND. | |
| uiNode_t * | UI_DNDGetSourceNode (void) |
| Return source of the DND. | |
| int | UI_DNDGetType (void) |
| Return the current type of the dragging object, else DND_NOTHING. | |
| Item * | UI_DNDGetItem (void) |
| enum uiDNDType_t |
| Enumerator | |
|---|---|
| DND_NOTHING | |
| DND_SOMETHING | Untyped object |
| DND_ITEM | |
Definition at line 32 of file ui_dragndrop.h.
Drop the object at the current position.
Definition at line 147 of file ui_dragndrop.cpp.
References DND_NOTHING, nodeAcceptDND, objectType, sourceNode, targetNode, UI_DNDAbort(), UI_DNDCleanup(), UI_DNDIsDragging(), UI_InvalidateMouse(), UI_Node_DndFinished(), and UI_Node_DndLeave().
Referenced by uiBaseInventoryNode::onMouseDown(), uiContainerNode::onMouseDown(), UI_DNDAbort(), UI_DNDDrop(), UI_KeyPressed(), and UI_ReleaseInput().
Start to drag an item.
Definition at line 124 of file ui_dragndrop.cpp.
References DND_ITEM, draggingItem, objectType, UI_DNDDrag(), UI_DNDDragItem(), and UI_DNDIsDragging().
Referenced by uiBaseInventoryNode::onCapturedMouseMove(), uiContainerNode::onCapturedMouseMove(), and UI_DNDDragItem().
Drop the object at the current position.
Definition at line 167 of file ui_dragndrop.cpp.
References DND_NOTHING, mousePosX, mousePosY, objectType, positionAcceptDND, sourceNode, targetNode, UI_DNDAbort(), UI_DNDCleanup(), UI_DNDDrop(), UI_DNDIsDragging(), UI_InvalidateMouse(), UI_Node_DndDrop(), UI_Node_DndFinished(), and UI_PlaySound().
Referenced by uiBaseInventoryNode::onMouseUp(), uiContainerNode::onMouseUp(), and UI_DNDDrop().
Definition at line 190 of file ui_dragndrop.cpp.
References DND_ITEM, draggingItem, objectType, and UI_DNDGetItem().
Referenced by uiBaseInventoryNode::draw(), uiContainerNode::draw(), uiContainerNode::onDndFinished(), uiContainerNode::onDndMove(), UI_ContainerNodeDrawDropPreview(), UI_ContainerNodeDrawFreeSpace(), and UI_DNDGetItem().
Return source of the DND.
Definition at line 97 of file ui_dragndrop.cpp.
References sourceNode, UI_DNDGetSourceNode(), and UI_DNDIsDragging().
Referenced by uiBaseInventoryNode::onDndEnter(), uiContainerNode::onDndEnter(), and UI_DNDGetSourceNode().
Return target of the DND.
Definition at line 88 of file ui_dragndrop.cpp.
References targetNode, UI_DNDGetTargetNode(), and UI_DNDIsDragging().
Referenced by uiContainerNode::onDndFinished(), and UI_DNDGetTargetNode().
Return the current type of the dragging object, else DND_NOTHING.
Definition at line 80 of file ui_dragndrop.cpp.
References objectType, and UI_DNDGetType().
Referenced by uiBaseInventoryNode::draw(), uiContainerNode::draw(), uiBaseInventoryNode::onDndEnter(), uiContainerNode::onDndEnter(), and UI_DNDGetType().
| bool UI_DNDIsDragging | ( | void | ) |
Return true if we are dragging something.
Definition at line 52 of file ui_dragndrop.cpp.
References DND_NOTHING, objectType, and UI_DNDIsDragging().
Referenced by uiBaseInventoryNode::draw(), uiContainerNode::draw(), uiBaseInventoryNode::onMouseDown(), uiContainerNode::onMouseDown(), uiBaseInventoryNode::onMouseUp(), uiContainerNode::onMouseUp(), SCR_DrawCursor(), UI_ContainerNodeDrawFreeSpace(), UI_DNDAbort(), UI_DNDDrag(), UI_DNDDragItem(), UI_DNDDrop(), UI_DNDGetSourceNode(), UI_DNDGetTargetNode(), UI_DNDIsDragging(), UI_DNDIsSourceNode(), UI_DNDIsTargetNode(), UI_Draw(), UI_KeyPressed(), UI_MouseMove(), and UI_ReleaseInput().
| bool UI_DNDIsSourceNode | ( | uiNode_t * | node | ) |
Return true if the requested node is the source of the DND.
Definition at line 70 of file ui_dragndrop.cpp.
References sourceNode, UI_DNDIsDragging(), and UI_DNDIsSourceNode().
Referenced by UI_ContainerNodeDrawFreeSpace(), and UI_DNDIsSourceNode().
| bool UI_DNDIsTargetNode | ( | uiNode_t * | node | ) |
Return true if the requested node is the current target of the DND.
Definition at line 60 of file ui_dragndrop.cpp.
References targetNode, UI_DNDIsDragging(), and UI_DNDIsTargetNode().
Referenced by uiContainerNode::draw(), and UI_DNDIsTargetNode().
Draw to dragging object and catch mouse move event.
Definition at line 230 of file ui_dragndrop.cpp.
References DND_ITEM, draggingItem, mousePosX, mousePosY, objectType, oldMousePosX, oldMousePosY, positionAcceptDND, UI_DNDMouseMove(), UI_DrawDragAndDrop(), UI_DrawItem(), and VectorSet.
Referenced by UI_DrawCursor(), and UI_DrawDragAndDrop().