|
37 | 37 | <description> |
38 | 38 | Godot calls this method to test if [param data] from a control's [method _get_drag_data] can be dropped at [param at_position]. [param at_position] is local to this control. |
39 | 39 | This method should only be used to test the data. Process the data in [method _drop_data]. |
40 | | - [b]Note:[/b] If drag was initiated by keyboard shortcut or [method accessibility_drag], [param at_position] is set to [code]Vector2(INFINITY, INFINITY)[/code] and the currently selected item/text position should be used as drop position. |
| 40 | + [b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method accessibility_drag], [param at_position] is set to [constant Vector2.INF], and the currently selected item/text position should be used as the drop position. |
41 | 41 | [codeblocks] |
42 | 42 | [gdscript] |
43 | 43 | func _can_drop_data(position, data): |
|
62 | 62 | <param index="1" name="data" type="Variant" /> |
63 | 63 | <description> |
64 | 64 | Godot calls this method to pass you the [param data] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [param data] is allowed to drop at [param at_position] where [param at_position] is local to this control. |
65 | | - [b]Note:[/b] If drag was initiated by keyboard shortcut or [method accessibility_drag], [param at_position] is set to [code]Vector2(INFINITY, INFINITY)[/code] and the currently selected item/text position should be used as drop position. |
| 65 | + [b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method accessibility_drag], [param at_position] is set to [constant Vector2.INF], and the currently selected item/text position should be used as the drop position. |
66 | 66 | [codeblocks] |
67 | 67 | [gdscript] |
68 | 68 | func _can_drop_data(position, data): |
|
98 | 98 | <description> |
99 | 99 | Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [param at_position] is local to this control. Drag may be forced with [method force_drag]. |
100 | 100 | A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. |
101 | | - [b]Note:[/b] If drag was initiated by keyboard shortcut or [method accessibility_drag], [param at_position] is set to [code]Vector2(INFINITY, INFINITY)[/code] and the currently selected item/text position should be used as drop position. |
| 101 | + [b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method accessibility_drag], [param at_position] is set to [constant Vector2.INF], and the currently selected item/text position should be used as the drag position. |
102 | 102 | [codeblocks] |
103 | 103 | [gdscript] |
104 | 104 | func _get_drag_data(position): |
|
0 commit comments