diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-28 09:15:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 09:15:40 +0200 |
commit | 185072015f0fa38bbb2b48f5bd3b39cc6e07c487 (patch) | |
tree | b527e47882a292fe377dc6325306a250f6ecc6bb /scene/gui | |
parent | 2dbc7d312ffdcbd9745e8ef70d81c7b7a61ef0ec (diff) | |
parent | a919f5e614d0a2212e50c648aa0fb3e31c61e9e0 (diff) |
Merge pull request #31606 from toasteater/fix/nativescript-new-json-return-type
Fix the return type of NativeScript::new in API json
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"))); |