diff options
author | toasteater <48371905+toasteater@users.noreply.github.com> | 2019-08-26 16:38:16 +0000 |
---|---|---|
committer | toasteater <48371905+toasteater@users.noreply.github.com> | 2019-08-26 16:38:16 +0000 |
commit | a919f5e614d0a2212e50c648aa0fb3e31c61e9e0 (patch) | |
tree | 9a6d9d74e142585a6b1b845c3a4de40ae07e0fb6 /scene/gui | |
parent | e2121c97ae4e1c0d94eb3caf29118a28a31fdca3 (diff) |
Fix return type of Control::get_drag_data in API json
Control::get_drag_data is a virtual method that returns Variant, but have the
Object type in its MethodInfo.
This changes the MethodInfo of Control::get_drag_data
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/control.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index b655feecbe..034e9266f6 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2918,7 +2918,11 @@ void Control::_bind_methods() { BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size")); - BIND_VMETHOD(MethodInfo(Variant::OBJECT, "get_drag_data", PropertyInfo(Variant::VECTOR2, "position"))); + + MethodInfo get_drag_data = MethodInfo("get_drag_data", PropertyInfo(Variant::VECTOR2, "position")); + get_drag_data.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; + BIND_VMETHOD(get_drag_data); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data"))); BIND_VMETHOD(MethodInfo("drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data"))); BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_make_custom_tooltip", PropertyInfo(Variant::STRING, "for_text"))); |