C# Class FairyGUI.DragDropManager

Helper for drag and drop. 这是一个提供特殊拖放功能的功能类。与GObject.draggable不同,拖动开始后,他使用一个替代的图标作为拖动对象。 当玩家释放鼠标/手指,目标组件会发出一个onDrop事件。
显示文件 Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Methods

Method Description
Cancel ( ) : void

Cancel dragging. 取消拖动。

DragDropManager ( ) : System
StartDrag ( GObject source, string icon, object sourceData, int touchPointID = -1 ) : void

Start dragging. 开始拖动。

Private Methods

Method Description
__dragEnd ( EventContext evt ) : void

Method Details

Cancel() public method

Cancel dragging. 取消拖动。
public Cancel ( ) : void
return void

DragDropManager() public method

public DragDropManager ( ) : System
return System

StartDrag() public method

Start dragging. 开始拖动。
public StartDrag ( GObject source, string icon, object sourceData, int touchPointID = -1 ) : void
source GObject Source object. This is the object which initiated the dragging.
icon string Icon to be used as the dragging sign.
sourceData object Custom data. You can get it in the onDrop event data.
touchPointID int Copy the touchId from InputEvent to here, if has one.
return void