-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Viewport.gui_cancel_drag()
to GDScript as a counterpart to Control.force_drag()
#96614
Conversation
@KoBeWi it looks like the Linux mono build experienced a NuGet API timeout, could you give it another kick? |
Your commit seems not to be linked to your GitHub account. See: Why are my commits linked to the wrong user? for more info. |
7342790
to
241788b
Compare
@AThousandShips My bad. I just linked the email address and amended the commit, since the docs indicate old commits won't get picked up. |
241788b
to
693961c
Compare
@AThousandShips Based on your comment, I interpreted the CI pipeline failing as somehow related to the unlinked commit, but I see that it's failed again. Were those two things not related? |
Viewport.gui_cancel_drag()
to GDScript as a counterpart to Control.force_drag()
The CI is failing because the documentation XML needs to be updated to match the API change you made (removing the diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 441239d..350fd65 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -117,7 +117,7 @@
Returns the visible rectangle in global screen coordinates.
</description>
</method>
- <method name="gui_cancel_drag" qualifiers="const">
+ <method name="gui_cancel_drag">
<return type="void" />
<description>
Cancels the drag operation that was previously started through [method Control._get_drag_data] or forced with [method Control.force_drag]. |
…trol.force_drag()
693961c
to
e589c5b
Compare
Thanks, I've addressed the documentation XML. It hadn't gotten that far when I looked at it. It failed with a NuGet API timeout. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
Thanks, everyone for the patience, feedback, and help to push this across the finish line! |
Using Control.force_drag() has no counterpart to abort a drag operation. The expectation is that a left mouse click completes the operation. This small changes exposes the Viewport.gui_cancel_drag() method to GDScript, per @KoBeWi's suggestion in godotengine/godot-proposals/issues/10624.