Merge pull request #96614 from graydoubt/feat/cancel_drag
Expose `Viewport.gui_cancel_drag()` to GDScript as a counterpart to `Control.force_drag()`
This commit is contained in:
commit
a6db33ef89
|
@ -117,6 +117,12 @@
|
|||
Returns the visible rectangle in global screen coordinates.
|
||||
</description>
|
||||
</method>
|
||||
<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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="gui_get_drag_data" qualifiers="const">
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
|
|
|
@ -4695,6 +4695,7 @@ void Viewport::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("warp_mouse", "position"), &Viewport::warp_mouse);
|
||||
ClassDB::bind_method(D_METHOD("update_mouse_cursor_state"), &Viewport::update_mouse_cursor_state);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("gui_cancel_drag"), &Viewport::gui_cancel_drag);
|
||||
ClassDB::bind_method(D_METHOD("gui_get_drag_data"), &Viewport::gui_get_drag_data);
|
||||
ClassDB::bind_method(D_METHOD("gui_is_dragging"), &Viewport::gui_is_dragging);
|
||||
ClassDB::bind_method(D_METHOD("gui_is_drag_successful"), &Viewport::gui_is_drag_successful);
|
||||
|
|
Loading…
Reference in New Issue