From 4d6dd2e452e9294fc2e447bef22c608eb55edcea Mon Sep 17 00:00:00 2001 From: kobewi Date: Sat, 23 Apr 2022 17:26:26 +0200 Subject: [PATCH] Improve descriptions for drag methods (cherry picked from commit 31a23ab33f6ac80931c7f0027ff4f15f4a3c2172) --- doc/classes/Control.xml | 3 ++- doc/classes/Node.xml | 7 +++++-- doc/classes/Viewport.xml | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 11833c296..714701455 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -435,7 +435,8 @@ - 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]. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index fd48e9a13..a093efa0d 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -812,10 +812,13 @@ Notification received when the node is instanced. - 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. - 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. Notification received when the node's [NodePath] changed. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index e5cabc39c..511f9b443 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -124,6 +124,7 @@ 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.