summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-04-25 16:56:57 +0200
committerGitHub <noreply@github.com>2022-04-25 16:56:57 +0200
commitac4e322ac8c1beb866d5a8d4ac1f52de2d490262 (patch)
treefebf2b399a12af0a9bc0652e994f39dae6c5e4cd /doc
parentdf4de306a9c20cf4d4e87c89b448ac71f7a31444 (diff)
parent31a23ab33f6ac80931c7f0027ff4f15f4a3c2172 (diff)
Merge pull request #60472 from KoBeWi/dragging_rights
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Control.xml3
-rw-r--r--doc/classes/Node.xml7
-rw-r--r--doc/classes/Viewport.xml1
3 files changed, 8 insertions, 3 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 7e1bceb888..d084bd4db9 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -665,7 +665,8 @@
<method name="is_drag_successful" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if drag operation is successful.
+ Returns [code]true[/code] if a drag operation is successful. Alternative to [method Viewport.gui_is_drag_successful].
+ Best used with [constant Node.NOTIFICATION_DRAG_END].
</description>
</method>
<method name="is_layout_rtl" qualifiers="const">
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 3efa49b309..75f16e0c1c 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -843,10 +843,13 @@
Notification received when the node is instantiated.
</constant>
<constant name="NOTIFICATION_DRAG_BEGIN" value="21">
- Notification received when a drag begins.
+ Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
+ Can be triggered either by dragging a [Control] that provides drag data (see [method Control._get_drag_data]) or using [method Control.force_drag].
+ Use [method Viewport.gui_get_drag_data] to get the dragged data.
</constant>
<constant name="NOTIFICATION_DRAG_END" value="22">
- Notification received when a drag ends.
+ Notification received when a drag operation ends.
+ Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded.
</constant>
<constant name="NOTIFICATION_PATH_RENAMED" value="23">
Notification received when the node's name or one of its parents' name is changed. This notification is [i]not[/i] received when the node is removed from the scene tree to be added to another parent later on.
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 6f4720491d..ce466b2d0f 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -122,6 +122,7 @@
<return type="bool" />
<description>
Returns [code]true[/code] if the viewport is currently performing a drag operation.
+ Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node.NOTIFICATION_DRAG_END] when you prefer polling the value.
</description>
</method>
<method name="gui_release_focus">