#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 (struct uiNode_s *node, const struct item_s *item) |
void | UI_DNDDrop (void) |
Drop the object at the current position. | |
void | UI_DNDAbort (void) |
Drop the object at the current position. | |
qboolean | UI_DNDIsDragging (void) |
Return true if we are dragging something. | |
qboolean | UI_DNDIsTargetNode (struct uiNode_s *node) |
Return true if the requested node is the current target of the DND. | |
qboolean | UI_DNDIsSourceNode (struct uiNode_s *node) |
Return true if the requested node is the source of the DND. | |
struct uiNode_s * | UI_DNDGetTargetNode (void) |
Return target of the DND. | |
struct uiNode_s * | UI_DNDGetSourceNode (void) |
Return source of the DND. | |
int | UI_DNDGetType (void) |
Return the current type of the dragging object, else DND_NOTHING. | |
struct item_s * | UI_DNDGetItem (void) |
Definition in file ui_dragndrop.h.
enum uiDNDType_t |
Definition at line 33 of file ui_dragndrop.h.
void UI_DNDAbort | ( | void | ) |
Drop the object at the current position.
Definition at line 145 of file ui_dragndrop.c.
References uiNode_s::behaviour, DND_NOTHING, uiBehaviour_s::dndFinished, uiBehaviour_s::dndLeave, nodeAcceptDND, objectType, qfalse, UI_DNDCleanup(), UI_DNDIsDragging(), and UI_InvalidateMouse().
Referenced by UI_BaseInventoryNodeMouseDown(), UI_ContainerNodeMouseDown(), UI_DNDDrop(), UI_KeyPressed(), and UI_ReleaseInput().
void UI_DNDDrop | ( | void | ) |
Drop the object at the current position.
Definition at line 165 of file ui_dragndrop.c.
References uiNode_s::behaviour, DND_NOTHING, uiBehaviour_s::dndDrop, uiBehaviour_s::dndFinished, mousePosX, mousePosY, objectType, positionAcceptDND, qfalse, UI_DNDAbort(), UI_DNDCleanup(), UI_DNDIsDragging(), UI_InvalidateMouse(), and UI_PlaySound().
Referenced by UI_BaseInventoryNodeMouseUp(), and UI_ContainerNodeMouseUp().
struct item_s* UI_DNDGetItem | ( | void | ) | [read] |
Definition at line 188 of file ui_dragndrop.c.
References DND_ITEM, and objectType.
Referenced by UI_BaseInventoryNodeDraw(), UI_ContainerNodeDNDFinished(), UI_ContainerNodeDNDMove(), UI_ContainerNodeDraw(), UI_ContainerNodeDrawDropPreview(), and UI_ContainerNodeDrawFreeSpace().
struct uiNode_s* UI_DNDGetSourceNode | ( | void | ) | [read] |
Return source of the DND.
Definition at line 95 of file ui_dragndrop.c.
References UI_DNDIsDragging().
Referenced by UI_BaseInventoryNodeDNDEnter(), and UI_ContainerNodeDNDEnter().
struct uiNode_s* UI_DNDGetTargetNode | ( | void | ) | [read] |
Return target of the DND.
Definition at line 86 of file ui_dragndrop.c.
References UI_DNDIsDragging().
Referenced by UI_ContainerNodeDNDFinished().
int UI_DNDGetType | ( | void | ) |
Return the current type of the dragging object, else DND_NOTHING.
Definition at line 78 of file ui_dragndrop.c.
References objectType.
Referenced by UI_BaseInventoryNodeDNDEnter(), UI_BaseInventoryNodeDraw(), UI_ContainerNodeDNDEnter(), and UI_ContainerNodeDraw().
qboolean UI_DNDIsDragging | ( | void | ) |
Return true if we are dragging something.
Definition at line 50 of file ui_dragndrop.c.
References DND_NOTHING, and objectType.
Referenced by SCR_DrawCursor(), UI_BaseInventoryNodeDraw(), UI_BaseInventoryNodeMouseDown(), UI_BaseInventoryNodeMouseUp(), UI_ContainerNodeDraw(), UI_ContainerNodeDrawFreeSpace(), UI_ContainerNodeMouseDown(), UI_ContainerNodeMouseUp(), UI_DNDAbort(), UI_DNDDrag(), UI_DNDDragItem(), UI_DNDDrop(), UI_DNDGetSourceNode(), UI_DNDGetTargetNode(), UI_DNDIsSourceNode(), UI_DNDIsTargetNode(), UI_Draw(), UI_KeyPressed(), UI_MouseMove(), and UI_ReleaseInput().
Return true if the requested node is the source of the DND.
Definition at line 68 of file ui_dragndrop.c.
References qfalse, and UI_DNDIsDragging().
Referenced by UI_ContainerNodeDrawFreeSpace().
Return true if the requested node is the current target of the DND.
Definition at line 58 of file ui_dragndrop.c.
References qfalse, and UI_DNDIsDragging().
Referenced by UI_ContainerNodeDraw().
void UI_DrawDragAndDrop | ( | int | mousePosX, | |
int | mousePosY | |||
) |
Draw to dragging object and catch mouse move event.
Definition at line 229 of file ui_dragndrop.c.
References uiNode_s::color, DND_ITEM, objectType, oldMousePosX, oldMousePosY, positionAcceptDND, qfalse, scale, UI_DNDMouseMove(), UI_DrawItem(), and VectorSet.
Referenced by UI_DrawCursor().