Expansion of the guiDragAndDropCtrl - support for dragging to any control visible on the canvas.

This commit is contained in:
Areloch 2018-01-28 15:03:44 -06:00
parent 68efd8e22a
commit f731a91c78
2 changed files with 29 additions and 2 deletions

View file

@ -53,6 +53,8 @@ class GuiDragAndDropControl : public GuiControl
/// If true, the control deletes itself when the left mouse button is released.
bool mDeleteOnMouseUp;
bool mUseWholeCanvas;
/// Controls may want to react when they are dragged over, entered or exited.
SimObjectPtr<GuiControl> mLastTarget;
@ -81,6 +83,8 @@ class GuiDragAndDropControl : public GuiControl
DECLARE_DESCRIPTION( "A special control that implements drag&drop behavior.\n"
"The control will notify other controls as it moves across the canvas.\n"
"Content can be attached through dynamic fields or child objects." );
DECLARE_CALLBACK(void, onControlDragCancelled, ());
};
#endif