Merge pull request #56325 from pycbouh/editor-resource-picker-needs-type-3.x

This commit is contained in:
Rémi Verschelde 2022-01-07 16:13:46 +01:00 committed by GitHub
commit 01fef99749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@
</description>
</method>
<method name="handle_menu_selected" qualifiers="virtual">
<return type="void" />
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
This virtual method can be implemented to handle context menu items not handled by default. See [method set_create_options].

View file

@ -687,7 +687,7 @@ void EditorResourcePicker::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_editable"), &EditorResourcePicker::is_editable);
ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_create_options", PropertyInfo(Variant::OBJECT, "menu_node")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("handle_menu_selected", PropertyInfo(Variant::INT, "id")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handle_menu_selected", PropertyInfo(Variant::INT, "id")));
ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_type"), "set_base_type", "get_base_type");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "edited_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource", 0), "set_edited_resource", "get_edited_resource");