UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_dragndrop.h File Reference
Include dependency graph for ui_dragndrop.h:
This graph shows which files directly or indirectly include this file:

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_tUI_DNDGetTargetNode (void)
 Return target of the DND.
uiNode_tUI_DNDGetSourceNode (void)
 Return source of the DND.
int UI_DNDGetType (void)
 Return the current type of the dragging object, else DND_NOTHING.
ItemUI_DNDGetItem (void)

Enumeration Type Documentation

◆ uiDNDType_t

Enumerator
DND_NOTHING 
DND_SOMETHING 

Untyped object

DND_ITEM 

Definition at line 32 of file ui_dragndrop.h.

Function Documentation

◆ UI_DNDAbort()

◆ UI_DNDDragItem()

void UI_DNDDragItem ( uiNode_t * node,
const Item * item )

◆ UI_DNDDrop()

◆ UI_DNDGetItem()

◆ UI_DNDGetSourceNode()

uiNode_t * UI_DNDGetSourceNode ( void )

Return source of the DND.

Definition at line 97 of file ui_dragndrop.cpp.

References sourceNode, and UI_DNDIsDragging().

Referenced by uiBaseInventoryNode::onDndEnter(), and uiContainerNode::onDndEnter().

◆ UI_DNDGetTargetNode()

uiNode_t * UI_DNDGetTargetNode ( void )

Return target of the DND.

Definition at line 88 of file ui_dragndrop.cpp.

References targetNode, and UI_DNDIsDragging().

Referenced by uiContainerNode::onDndFinished().

◆ UI_DNDGetType()

int UI_DNDGetType ( void )

Return the current type of the dragging object, else DND_NOTHING.

Definition at line 80 of file ui_dragndrop.cpp.

References objectType.

Referenced by uiBaseInventoryNode::draw(), uiContainerNode::draw(), uiBaseInventoryNode::onDndEnter(), and uiContainerNode::onDndEnter().

◆ UI_DNDIsDragging()

◆ UI_DNDIsSourceNode()

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, and UI_DNDIsDragging().

Referenced by UI_ContainerNodeDrawFreeSpace().

◆ UI_DNDIsTargetNode()

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, and UI_DNDIsDragging().

Referenced by uiContainerNode::draw().

◆ UI_DrawDragAndDrop()

void UI_DrawDragAndDrop ( int mousePosX,
int mousePosY )

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, scale, UI_DNDMouseMove(), UI_DrawItem(), and VectorSet.

Referenced by UI_DrawCursor().