From cd0b2a140cda583359c8a27e360765c9d98c7f74 Mon Sep 17 00:00:00 2001
From: kleonc <9283098+kleonc@users.noreply.github.com>
Date: Sat, 22 Mar 2025 12:29:59 +0100
Subject: [PATCH] Improve docs for EditorResourcePicker::_set_create_options
---
doc/classes/EditorResourcePicker.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index fbbc68c6dc..4a096f486b 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -21,8 +21,9 @@
- This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node.
+ This virtual method is called when updating the context menu of an [member editable] [EditorResourcePicker]. Implement this method to override the "New" items section with your own options. [param menu_node] is a reference to the [PopupMenu] node.
[b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items.
+ [b]Note:[/b] Relevant built-in options ("Load", "Copy", "Paste", etc.) are automatically added to the [param menu_node] afterwards, using their hard-coded IDs starting from [code]0[/code]. Custom options need to use non-colliding IDs to be handled properly. Using [code]id = 100 + custom_option_index[/code] is safe (this is what the default items in the "New" section use).