界面 / DragDropOperation
DragDropOperation Class
UI 拖拽事件
Table of contents
Methods
equal(other: DragDropOperation): boolean client |
|---|
| 判断是否相同 |
getDragPivot(): DragPivot client |
| 获取拖拽锚点 |
getDragVisualWidget(): Widget client |
| 获取拖拽显示的UI |
getOffset(): Vector2 client |
| 获取拖拽UI的百分比偏移 |
getTag(): string client |
| 获取Tag 标签 |
tryGetDragDropPayLoad(): DragDropPayLoad client |
| 获取传递的数据信息 |
tryGetDragDropPayLoadAs<T: extends DragDropPayLoad<T>>(): T: extends DragDropPayLoad<T> client |
| 获取传递的数据信息 |
• Private new DragDropOperation()
Methods
equal
• equal(other): boolean client
判断是否相同
Parameters
other DragDropOperation | 另一个UI拖拽事件 |
|---|
Returns
boolean | boolean |
|---|
getDragPivot
• getDragPivot(): DragPivot client
获取拖拽锚点
Returns
DragPivot | 拖拽锚点 |
|---|
getDragVisualWidget
• getDragVisualWidget(): Widget client
获取拖拽显示的UI
Returns
Widget | 拖拽显示的UI |
|---|
getOffset
• getOffset(): Vector2 client
获取拖拽UI的百分比偏移
Returns
Vector2 | 百分比偏移 |
|---|
getTag
• getTag(): string client
获取Tag 标签
Returns
string | 返回tag |
|---|
tryGetDragDropPayLoad
• tryGetDragDropPayLoad(): DragDropPayLoad client
获取传递的数据信息
Returns
DragDropPayLoad | 数据信息 |
|---|
tryGetDragDropPayLoadAs
• tryGetDragDropPayLoadAs<T>(): T client
获取传递的数据信息
Returns
T | 数据信息 |
|---|
Type parameters
T | extends DragDropPayLoad<T> |
|---|